mirror of
https://github.com/friendica/friendica
synced 2025-04-26 15:10:11 +00:00
Replace references to UTC_TIMESTAMP in SQL queries with a DateTimeFormat generated parameter
This commit is contained in:
parent
ecaed2a845
commit
80da47921e
14 changed files with 37 additions and 28 deletions
|
@ -754,7 +754,7 @@ class Worker
|
|||
}
|
||||
|
||||
$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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue