diff options
author | Mario <mario@mariovavti.com> | 2022-12-22 13:29:34 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2022-12-22 13:29:34 +0000 |
commit | 2b0404fefc69678db7afa5e1f25a5f1fabd50907 (patch) | |
tree | f01472784a17a4dd34810dec2f9bf4d848ade2b0 /Zotlabs | |
parent | 7ef946228643a893ce07bed3b2d25473b3bde50c (diff) | |
download | volse-hubzilla-2b0404fefc69678db7afa5e1f25a5f1fabd50907.tar.gz volse-hubzilla-2b0404fefc69678db7afa5e1f25a5f1fabd50907.tar.bz2 volse-hubzilla-2b0404fefc69678db7afa5e1f25a5f1fabd50907.zip |
queueworker: add some more details
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Module/Queueworker.php | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Zotlabs/Module/Queueworker.php b/Zotlabs/Module/Queueworker.php index 7c5e4f1cf..0e0529bc0 100644 --- a/Zotlabs/Module/Queueworker.php +++ b/Zotlabs/Module/Queueworker.php @@ -51,22 +51,24 @@ class Queueworker extends Controller { $content = "<H1>Queue Status</H1>\n"; - $r = q('select count(*) as qentries from workerq'); + $r = q('select count(*) as total from workerq'); - if (!$r) { - $content = "<H4>There was an error querying the database.</H4>"; - return $content; - } - - $content .= "<H4>There are " . $r[0]['qentries'] . " queue items to be processed.</H4>"; + $content .= "<H4>There are " . $r[0]['total'] . " queue items to be processed.</H4>"; $r = dbq("select count(distinct workerq_reservationid) as qworkers from workerq where workerq_reservationid is not null"); $content .= "<H4>Active workers: " . $r[0]['qworkers'] . "</H4>"; + $r = dbq("select workerq_cmd, count(*) as total from workerq where true group by workerq_cmd"); + + $content .= "<H4>Work items</H4>"; + + foreach($r as $rr) { + $content .= $rr['workerq_cmd'] . ': ' . $rr['total'] . '<br>'; + } + $maxqueueworkers = get_config('queueworker', 'max_queueworkers', 4); $maxqueueworkers = ($maxqueueworkers > 3) ? $maxqueueworkers : 4; - //set_config('queueworker', 'max_queueworkers', $maxqueueworkers); $sc = ''; @@ -81,7 +83,6 @@ class Queueworker extends Controller { $workermaxage = get_config('queueworker', 'queueworker_max_age'); $workermaxage = ($workermaxage >= 120) ? $workermaxage : 300; - //set_config('queueworker', 'max_queueworker_age', $workermaxage); $sc .= replace_macros(get_markup_template('field_input.tpl'), [ '$field' => [ @@ -94,7 +95,6 @@ class Queueworker extends Controller { $queueworkersleep = get_config('queueworker', 'queue_worker_sleep'); $queueworkersleep = ($queueworkersleep > 100) ? $queueworkersleep : 100; - //set_config('queueworker', 'queue_worker_sleep', $queueworkersleep); $sc .= replace_macros(get_markup_template('field_input.tpl'), [ '$field' => [ |