mirror of
https://github.com/friendica/friendica
synced 2025-04-26 15:10:11 +00:00
Check for bad worker priorities
This commit is contained in:
parent
7e3196776b
commit
dd94fb1242
5 changed files with 15 additions and 6 deletions
|
@ -421,6 +421,11 @@ class Worker
|
|||
// For this reason the variables have to be initialized.
|
||||
DI::profiler()->reset();
|
||||
|
||||
if (!in_array($queue['priority'], PRIORITIES)) {
|
||||
Logger::warning('Invalid period', ['queue' => $queue, 'callstack' => System::callstack(20)]);
|
||||
$queue['priority'] = PRIORITY_MEDIUM;
|
||||
}
|
||||
|
||||
$a->queue = $queue;
|
||||
|
||||
$up_duration = microtime(true) - self::$up_start;
|
||||
|
@ -1264,6 +1269,11 @@ class Worker
|
|||
$found = DBA::exists('workerqueue', ['command' => $command, 'parameter' => $parameters, 'done' => false]);
|
||||
$added = false;
|
||||
|
||||
if (!in_array($priority, PRIORITIES)) {
|
||||
Logger::warning('Invalid period', ['priority' => $priority, 'command' => $command, 'callstack' => System::callstack(20)]);
|
||||
$priority = PRIORITY_MEDIUM;
|
||||
}
|
||||
|
||||
// Quit if there was a database error - a precaution for the update process to 3.5.3
|
||||
if (DBA::errorNo() != 0) {
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue