diff --git a/app/tasks/schedule.php b/app/tasks/schedule.php index 0e41d56b5c..d23314066e 100644 --- a/app/tasks/schedule.php +++ b/app/tasks/schedule.php @@ -15,6 +15,7 @@ const FUNCTION_ENQUEUE_TIMER = 60; //seconds const FUNCTION_ENQUEUE_TIMEFRAME = 60 * 5; // 5 min sleep(4); + /** * 1. first load from db with limit+offset * 2. creating a 5-min offset array ($queue) @@ -106,7 +107,8 @@ $cli /** * The timer updates $functions from db on last resourceUpdatedAt attr in X-min. */ - + Co\run( + function () use ($removeFromQueue, $createQueue, $dbForConsole, &$functions, &$queue, &$lastUpdate) { Timer::tick(FUNCTION_UPDATE_TIMER * 1000, function () use ($removeFromQueue, $createQueue, $dbForConsole, &$functions, &$queue, &$lastUpdate) { $time = DateTime::now(); $limit = 1000; @@ -197,6 +199,6 @@ $cli $timerEnd = \microtime(true); Console::info("Queue timer: finished in " . ($timerEnd - $timerStart) . " seconds"); }); - - + } + ); }); diff --git a/composer.json b/composer.json index 1775a2bdf5..304ea2bebe 100644 --- a/composer.json +++ b/composer.json @@ -61,7 +61,7 @@ "utopia-php/websocket": "0.1.0", "utopia-php/image": "0.5.*", "utopia-php/orchestration": "0.6.*", - "utopia-php/pools": "dev-feat-optimize-filling as 0.3.0", + "utopia-php/pools": "0.4.0", "resque/php-resque": "1.3.6", "matomo/device-detector": "6.0.0", "dragonmantank/cron-expression": "3.3.1",