From 751ffe6bc6241346e1daa84610b310c86c22240e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ibhear=20=C3=93=20hAnluain?= Date: Fri, 29 Mar 2024 15:59:35 +0000 Subject: [PATCH] Add the next_try field to the worker job queue list --- src/Module/Admin/Queue.php | 4 +++- view/templates/admin/queue.tpl | 2 ++ view/theme/frio/templates/admin/queue.tpl | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Module/Admin/Queue.php b/src/Module/Admin/Queue.php index 54d70b27d9..e309bfc647 100644 --- a/src/Module/Admin/Queue.php +++ b/src/Module/Admin/Queue.php @@ -56,13 +56,14 @@ class Queue extends BaseAdmin } // @TODO Move to Model\WorkerQueue::getEntries() - $entries = DBA::select('workerqueue', ['id', 'parameter', 'created', 'priority', 'command'], $condition, ['limit' => 999, 'order' => ['created']]); + $entries = DBA::select('workerqueue', ['id', 'parameter', 'created', 'next_try', 'priority', 'command'], $condition, ['limit' => 999, 'order' => ['created']]); $r = []; while ($entry = DBA::fetch($entries)) { // fix GH-5469. ref: src/Core/Worker.php:217 $entry['parameter'] = Arrays::recursiveImplode(json_decode($entry['parameter'], true), ': '); $entry['created'] = DateTimeFormat::local($entry['created']); + $entry['next_try'] = DateTimeFormat::local($entry['next_try']); $r[] = $entry; } DBA::close($entries); @@ -76,6 +77,7 @@ class Queue extends BaseAdmin '$command_header' => DI::l10n()->t('Command'), '$param_header' => DI::l10n()->t('Job Parameters'), '$created_header' => DI::l10n()->t('Created'), + '$next_try_header' => DI::l10n()->t('Next Try'), '$prio_header' => DI::l10n()->t('Priority'), '$info' => $info, '$entries' => $r, diff --git a/view/templates/admin/queue.tpl b/view/templates/admin/queue.tpl index d50ff2082f..c34f92f2cd 100644 --- a/view/templates/admin/queue.tpl +++ b/view/templates/admin/queue.tpl @@ -8,6 +8,7 @@ {{$command_header}} {{$param_header}} {{$created_header}} + {{$next_try_header}} {{$prio_header}} {{foreach $entries as $e}} @@ -16,6 +17,7 @@ {{$e.command}} {{$e.parameter}} {{$e.created}} + {{$e.next_try}} {{$e.priority}} {{/foreach}} diff --git a/view/theme/frio/templates/admin/queue.tpl b/view/theme/frio/templates/admin/queue.tpl index 4ee60af104..8abc63d2ec 100644 --- a/view/theme/frio/templates/admin/queue.tpl +++ b/view/theme/frio/templates/admin/queue.tpl @@ -8,6 +8,7 @@ {{$command_header}} {{$param_header}} {{$created_header}} + {{$next_try_header}} {{$prio_header}} {{foreach $entries as $e}} @@ -16,6 +17,7 @@ {{$e.command}} {{$e.parameter}} {{$e.created}} + {{$e.next_try}} {{$e.priority}} {{/foreach}}