mirror of
https://github.com/friendica/friendica
synced 2025-04-25 07:50:10 +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
|
@ -24,6 +24,7 @@ namespace Friendica\Worker;
|
|||
use Friendica\Core\Worker;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\DI;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
|
||||
/**
|
||||
* Delete all done workerqueue entries
|
||||
|
@ -32,7 +33,7 @@ class CleanWorkerQueue
|
|||
{
|
||||
public static function execute()
|
||||
{
|
||||
DBA::delete('workerqueue', ['`done` AND `executed` < UTC_TIMESTAMP() - INTERVAL 1 HOUR']);
|
||||
DBA::delete('workerqueue', ["`done` AND `executed` < ?", DateTimeFormat::utc('now - 1 hour')]);
|
||||
|
||||
// Optimizing this table only last seconds
|
||||
if (DI::config()->get('system', 'optimize_tables')) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue