}
$stamp = (float)microtime(true);
- $jobs = DBA::count('workerqueue', ["`done` AND `executed` > UTC_TIMESTAMP() - INTERVAL ? MINUTE", $interval]);
+ $jobs = DBA::count('workerqueue', ["`done` AND `executed` > ?", DateTimeFormat::utc('now - ' . $interval . ' minute')]);
self::$db_duration += (microtime(true) - $stamp);
self::$db_duration_stat += (microtime(true) - $stamp);
$jobs_per_minute[$interval] = number_format($jobs / $interval, 0);
* Defers the current worker entry
*
* @return boolean had the entry been deferred?
+ * @throws \Exception
*/
- public static function defer()
+ public static function defer(): bool
{
$queue = DI::app()->getQueue();
return false;
}
- $retrial = $queue['retrial'];
$id = $queue['id'];
$priority = $queue['priority'];