Fux reclaim logic in CLI; Prevent early executions
This commit is contained in:
parent
c13589c1ea
commit
1084631d0f
2 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
|
|
@ -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] = [];
|
||||
|
|
Loading…
Reference in a new issue