<?php
/**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2021, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
{
parent::content($parameters);
- $a = DI::app();
-
- // @TODO: Replace with parameter from router
- $deferred = $a->argc > 2 && $a->argv[2] == 'deferred';
+ $status = $parameters['status'] ?? '';
// get jobs from the workerqueue table
- if ($deferred) {
+ if ($status == 'deferred') {
$condition = ["NOT `done` AND `retrial` > ?", 0];
$sub_title = DI::l10n()->t('Inspect Deferred Worker Queue');
$info = DI::l10n()->t("This page lists the deferred worker jobs. This are jobs that couldn't be executed at the first time.");
}
// @TODO Move to Model\WorkerQueue::getEntries()
- $entries = DBA::select('workerqueue', ['id', 'parameter', 'created', 'priority'], $condition, ['limit' => 999, 'order' => ['created']]);
+ $entries = DBA::select('workerqueue', ['id', 'parameter', 'created', 'priority', 'command'], $condition, ['limit' => 999, 'order' => ['created']]);
$r = [];
while ($entry = DBA::fetch($entries)) {
'$page' => $sub_title,
'$count' => count($r),
'$id_header' => DI::l10n()->t('ID'),
+ '$command_header' => DI::l10n()->t('Command'),
'$param_header' => DI::l10n()->t('Job Parameters'),
'$created_header' => DI::l10n()->t('Created'),
'$prio_header' => DI::l10n()->t('Priority'),