Skip to content

Commit 772b725

Browse files
committed
Remove deprecations
1 parent 1286508 commit 772b725

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Model/Table/QueuedJobsTable.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -523,19 +523,19 @@ public function requestJob(array $tasks, array $groups = [], array $types = []):
523523
$driverName = $this->getDriverName();
524524

525525
$query = $this->find();
526-
$age = $query->newExpr()->add('IFNULL(TIMESTAMPDIFF(SECOND, "' . $nowStr . '", notbefore), 0)');
526+
$age = $query->expr()->add('IFNULL(TIMESTAMPDIFF(SECOND, "' . $nowStr . '", notbefore), 0)');
527527
switch ($driverName) {
528528
case static::DRIVER_SQLSERVER:
529-
$age = $query->newExpr()->add('ISNULL(DATEDIFF(SECOND, GETDATE(), notbefore), 0)');
529+
$age = $query->expr()->add('ISNULL(DATEDIFF(SECOND, GETDATE(), notbefore), 0)');
530530

531531
break;
532532
case static::DRIVER_POSTGRES:
533-
$age = $query->newExpr()
533+
$age = $query->expr()
534534
->add('COALESCE(EXTRACT(EPOCH FROM notbefore) - (EXTRACT(EPOCH FROM now())), 0)');
535535

536536
break;
537537
case static::DRIVER_SQLITE:
538-
$age = $query->newExpr()
538+
$age = $query->expr()
539539
->add('IFNULL(CAST(strftime("%s", CURRENT_TIMESTAMP) as integer) - CAST(strftime("%s", "' . $nowStr . '") as integer), 0)');
540540

541541
break;

0 commit comments

Comments
 (0)