1
0
Fork 0
mirror of synced 2024-10-01 01:37:56 +13:00

Fux reclaim logic in CLI; Prevent early executions

This commit is contained in:
Matej Baco 2022-11-15 12:23:08 +01:00
parent c13589c1ea
commit 1084631d0f
2 changed files with 2 additions and 2 deletions

View file

@ -70,7 +70,7 @@ CLI::setResource('getProjectDB', function (Group $pools, Database $dbForConsole,
$database = new Database($dbAdapter, $cache);
$database->setNamespace('_' . $project->getInternalId());
return [ $database, fn() => $connection->claim() ];
return [ $database, fn() => $connection->reclaim() ];
};
return $getProjectDB;

View file

@ -184,7 +184,7 @@ class Schedule extends Action
$executionStart = $nextDate->getTimestamp(); // in seconds
$executionSleep = $executionStart - $promiseStart; // Time to wait from now until execution needs to be queued
$delay = \intval($executionSleep);
$delay = \ceil(\intval($executionSleep));
if(!isset($delayedExecutions[$delay])) {
$delayedExecutions[$delay] = [];