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
+1 -1
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;
+1 -1
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] = [];