Add the next_try field to the worker job queue list

This commit is contained in:
Éibhear Ó hAnluain 2024-03-29 15:59:35 +00:00
parent 31b74b1c8a
commit 751ffe6bc6
No known key found for this signature in database
GPG key ID: D124FE9CF2177106
3 changed files with 7 additions and 1 deletions

View file

@ -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,

View file

@ -8,6 +8,7 @@
<th>{{$command_header}}</th>
<th>{{$param_header}}</th>
<th>{{$created_header}}</th>
<th>{{$next_try_header}}</th>
<th>{{$prio_header}}</th>
</tr>
{{foreach $entries as $e}}
@ -16,6 +17,7 @@
<td>{{$e.command}}</td>
<td>{{$e.parameter}}</td>
<td>{{$e.created}}</td>
<td>{{$e.next_try}}</td>
<td>{{$e.priority}}</td>
</tr>
{{/foreach}}

View file

@ -8,6 +8,7 @@
<th>{{$command_header}}</th>
<th>{{$param_header}}</th>
<th>{{$created_header}}</th>
<th>{{$next_try_header}}</th>
<th>{{$prio_header}}</th>
</tr>
{{foreach $entries as $e}}
@ -16,6 +17,7 @@
<td>{{$e.command}}</td>
<td>{{$e.parameter}}</td>
<td>{{$e.created}}</td>
<td>{{$e.next_try}}</td>
<td>{{$e.priority}}</td>
</tr>
{{/foreach}}