mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Fux reclaim logic in CLI; Prevent early executions
This commit is contained in:
+1
-1
@@ -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] = [];
|
||||
|
||||
Reference in New Issue
Block a user