You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by rn...@apache.org on 2021/02/05 14:03:47 UTC
[couchdb] 01/01: Show process status in active_tasks
This is an automated email from the ASF dual-hosted git repository.
rnewson pushed a commit to branch active-tasks-process-status
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit e1ad4e9bf1f69e062212dda90f3e19537cde8e35
Author: Robert Newson <rn...@apache.org>
AuthorDate: Fri Feb 5 14:02:43 2021 +0000
Show process status in active_tasks
This allows users to verify that compaction processes are suspended
outside of any configured strict_window.
---
src/couch/src/couch_task_status.erl | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/couch/src/couch_task_status.erl b/src/couch/src/couch_task_status.erl
index 4083c3f..ea83e18 100644
--- a/src/couch/src/couch_task_status.erl
+++ b/src/couch/src/couch_task_status.erl
@@ -124,7 +124,8 @@ handle_call({add_task, TaskProps}, {From, _}, Server) ->
end;
handle_call(all, _, Server) ->
All = [
- [{pid, ?l2b(pid_to_list(Pid))} | TaskProps]
+ [{pid, ?l2b(pid_to_list(Pid))},
+ {status, element(2, process_info(Pid, status))} | TaskProps]
||
{Pid, TaskProps} <- ets:tab2list(?MODULE)
],