Merge pull request #14060 from eibhear-from-athlone/friendica_14059_nexttry

Show the next try date and time on the deferred worker job list in the admin pages
pull/14064/head
Hypolite Petovan 2024-03-29 23:00:27 -04:00 committed by GitHub
commit fda2873a92
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 37 additions and 26 deletions

View File

@ -56,13 +56,14 @@ class Queue extends BaseAdmin
} }
// @TODO Move to Model\WorkerQueue::getEntries() // @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 = []; $r = [];
while ($entry = DBA::fetch($entries)) { while ($entry = DBA::fetch($entries)) {
// fix GH-5469. ref: src/Core/Worker.php:217 // fix GH-5469. ref: src/Core/Worker.php:217
$entry['parameter'] = Arrays::recursiveImplode(json_decode($entry['parameter'], true), ': '); $entry['parameter'] = Arrays::recursiveImplode(json_decode($entry['parameter'], true), ': ');
$entry['created'] = DateTimeFormat::local($entry['created']); $entry['created'] = DateTimeFormat::local($entry['created']);
$entry['next_try'] = DateTimeFormat::local($entry['next_try']);
$r[] = $entry; $r[] = $entry;
} }
DBA::close($entries); DBA::close($entries);
@ -76,8 +77,10 @@ class Queue extends BaseAdmin
'$command_header' => DI::l10n()->t('Command'), '$command_header' => DI::l10n()->t('Command'),
'$param_header' => DI::l10n()->t('Job Parameters'), '$param_header' => DI::l10n()->t('Job Parameters'),
'$created_header' => DI::l10n()->t('Created'), '$created_header' => DI::l10n()->t('Created'),
'$next_try_header' => DI::l10n()->t('Next Try'),
'$prio_header' => DI::l10n()->t('Priority'), '$prio_header' => DI::l10n()->t('Priority'),
'$info' => $info, '$info' => $info,
'$status' => $status,
'$entries' => $r, '$entries' => $r,
]); ]);
} }

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: 2024.06-dev\n" "Project-Id-Version: 2024.06-dev\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-03-27 11:11+0000\n" "POT-Creation-Date: 2024-03-29 20:29+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -2791,8 +2791,8 @@ msgstr ""
#: src/Core/Installer.php:516 #: src/Core/Installer.php:516
msgid "" msgid ""
"The web installer needs to be able to create a file called \"local.config.php" "The web installer needs to be able to create a file called \"local.config."
"\" in the \"config\" folder of your web server and it is unable to do so." "php\" in the \"config\" folder of your web server and it is unable to do so."
msgstr "" msgstr ""
#: src/Core/Installer.php:517 #: src/Core/Installer.php:517
@ -3952,8 +3952,8 @@ msgid ""
"profile\n" "profile\n"
"\t\t\t(on the \"Profiles\" page) so that other people can easily find you.\n" "\t\t\t(on the \"Profiles\" page) so that other people can easily find you.\n"
"\n" "\n"
"\t\t\tWe recommend adding a profile photo, adding some profile \"keywords" "\t\t\tWe recommend adding a profile photo, adding some profile "
"\" (very useful\n" "\"keywords\" (very useful\n"
"\t\t\tin making new friends) - and perhaps what country you live in; if you " "\t\t\tin making new friends) - and perhaps what country you live in; if you "
"do not wish\n" "do not wish\n"
"\t\t\tto be more specific than that.\n" "\t\t\tto be more specific than that.\n"
@ -4000,7 +4000,7 @@ msgstr ""
#: src/Module/Admin/Addons/Details.php:111 src/Module/Admin/Addons/Index.php:67 #: src/Module/Admin/Addons/Details.php:111 src/Module/Admin/Addons/Index.php:67
#: src/Module/Admin/Federation.php:220 src/Module/Admin/Logs/Settings.php:85 #: src/Module/Admin/Federation.php:220 src/Module/Admin/Logs/Settings.php:85
#: src/Module/Admin/Logs/View.php:83 src/Module/Admin/Queue.php:72 #: src/Module/Admin/Logs/View.php:83 src/Module/Admin/Queue.php:73
#: src/Module/Admin/Site.php:457 src/Module/Admin/Storage.php:138 #: src/Module/Admin/Site.php:457 src/Module/Admin/Storage.php:138
#: src/Module/Admin/Summary.php:196 src/Module/Admin/Themes/Details.php:90 #: src/Module/Admin/Summary.php:196 src/Module/Admin/Themes/Details.php:90
#: src/Module/Admin/Themes/Index.php:111 src/Module/Admin/Tos.php:77 #: src/Module/Admin/Themes/Index.php:111 src/Module/Admin/Tos.php:77
@ -4392,24 +4392,28 @@ msgid ""
"the worker cronjob you've set up during install." "the worker cronjob you've set up during install."
msgstr "" msgstr ""
#: src/Module/Admin/Queue.php:75 #: src/Module/Admin/Queue.php:76
msgid "ID" msgid "ID"
msgstr "" msgstr ""
#: src/Module/Admin/Queue.php:76 #: src/Module/Admin/Queue.php:77
msgid "Command" msgid "Command"
msgstr "" msgstr ""
#: src/Module/Admin/Queue.php:77 #: src/Module/Admin/Queue.php:78
msgid "Job Parameters" msgid "Job Parameters"
msgstr "" msgstr ""
#: src/Module/Admin/Queue.php:78 src/Module/Moderation/Reports.php:95 #: src/Module/Admin/Queue.php:79 src/Module/Moderation/Reports.php:95
#: src/Module/Settings/OAuth.php:74 #: src/Module/Settings/OAuth.php:74
msgid "Created" msgid "Created"
msgstr "" msgstr ""
#: src/Module/Admin/Queue.php:79 #: src/Module/Admin/Queue.php:80
msgid "Next Try"
msgstr ""
#: src/Module/Admin/Queue.php:81
msgid "Priority" msgid "Priority"
msgstr "" msgstr ""
@ -5723,9 +5727,9 @@ msgstr ""
#: src/Module/Admin/Summary.php:98 #: src/Module/Admin/Summary.php:98
msgid "" msgid ""
"The last update failed. Please run \"php bin/console.php dbstructure update" "The last update failed. Please run \"php bin/console.php dbstructure "
"\" from the command line and have a look at the errors that might appear. " "update\" from the command line and have a look at the errors that might "
"(Some of the errors are possibly inside the logfile.)" "appear. (Some of the errors are possibly inside the logfile.)"
msgstr "" msgstr ""
#: src/Module/Admin/Summary.php:102 #: src/Module/Admin/Summary.php:102
@ -5876,8 +5880,8 @@ msgstr ""
#, php-format #, php-format
msgid "" msgid ""
"Show some informations regarding the needed information to operate the node " "Show some informations regarding the needed information to operate the node "
"according e.g. to <a href=\"%s\" target=\"_blank\" rel=\"noopener noreferrer" "according e.g. to <a href=\"%s\" target=\"_blank\" rel=\"noopener "
"\">EU-GDPR</a>." "noreferrer\">EU-GDPR</a>."
msgstr "" msgstr ""
#: src/Module/Admin/Tos.php:81 #: src/Module/Admin/Tos.php:81
@ -9182,8 +9186,8 @@ msgstr ""
#: src/Module/Profile/Profile.php:158 #: src/Module/Profile/Profile.php:158
#, php-format #, php-format
msgid "" msgid ""
"You're currently viewing your profile as <b>%s</b> <a href=\"%s\" class=" "You're currently viewing your profile as <b>%s</b> <a href=\"%s\" "
"\"btn btn-sm pull-right\">Cancel</a>" "class=\"btn btn-sm pull-right\">Cancel</a>"
msgstr "" msgstr ""
#: src/Module/Profile/Profile.php:167 #: src/Module/Profile/Profile.php:167
@ -9703,8 +9707,8 @@ msgstr ""
#: src/Module/Security/TwoFactor/Verify.php:100 #: src/Module/Security/TwoFactor/Verify.php:100
#, php-format #, php-format
msgid "" msgid ""
"If you do not have access to your authentication code you can use a <a href=" "If you do not have access to your authentication code you can use a <a "
"\"%s\">two-factor recovery code</a>." "href=\"%s\">two-factor recovery code</a>."
msgstr "" msgstr ""
#: src/Module/Security/TwoFactor/Verify.php:101 #: src/Module/Security/TwoFactor/Verify.php:101
@ -11412,8 +11416,8 @@ msgstr ""
#: src/Module/Settings/TwoFactor/Verify.php:152 #: src/Module/Settings/TwoFactor/Verify.php:152
#, php-format #, php-format
msgid "" msgid ""
"<p>Or you can open the following URL in your mobile device:</p><p><a href=" "<p>Or you can open the following URL in your mobile device:</p><p><a "
"\"%s\">%s</a></p>" "href=\"%s\">%s</a></p>"
msgstr "" msgstr ""
#: src/Module/Settings/TwoFactor/Verify.php:159 #: src/Module/Settings/TwoFactor/Verify.php:159
@ -11522,9 +11526,9 @@ msgstr ""
msgid "" msgid ""
"At any point in time a logged in user can export their account data from the " "At any point in time a logged in user can export their account data from the "
"<a href=\"%1$s/settings/userexport\">account settings</a>. If the user wants " "<a href=\"%1$s/settings/userexport\">account settings</a>. If the user wants "
"to delete their account they can do so at <a href=\"%1$s/settings/removeme\">" "to delete their account they can do so at <a href=\"%1$s/settings/"
"%1$s/settings/removeme</a>. The deletion of the account will be permanent. " "removeme\">%1$s/settings/removeme</a>. The deletion of the account will be "
"Deletion of the data will also be requested from the nodes of the " "permanent. Deletion of the data will also be requested from the nodes of the "
"communication partners." "communication partners."
msgstr "" msgstr ""

View File

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

View File

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