From 8373be65d08fa4db0e3ff24019ba53213812e773 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Fri, 15 Jan 2021 19:19:48 +0200 Subject: [PATCH] Fix for swoole error --- app/workers/functions.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/app/workers/functions.php b/app/workers/functions.php index 577e847337..f3d83e19a0 100644 --- a/app/workers/functions.php +++ b/app/workers/functions.php @@ -18,8 +18,6 @@ require_once __DIR__.'/../init.php'; \cli_set_process_title('Functions V1 Worker'); -Runtime::setHookFlags(SWOOLE_HOOK_ALL); - Console::success(APP_NAME.' functions worker v1 has started'); $environments = Config::getParam('environments'); @@ -29,11 +27,11 @@ $environments = Config::getParam('environments'); */ $warmupStart = \microtime(true); -Co\run(function() use ($environments) { // Warmup: make sure images are ready to run fast 🚀 - Swoole\Runtime::enableCoroutine(SWOOLE_HOOK_ALL); +// Co\run(function() use ($environments) { // Warmup: make sure images are ready to run fast 🚀 + // Swoole\Runtime::enableCoroutine(SWOOLE_HOOK_ALL); foreach($environments as $environment) { - go(function() use ($environment) { + // go(function() use ($environment) { $stdout = ''; $stderr = ''; @@ -53,9 +51,9 @@ Co\run(function() use ($environments) { // Warmup: make sure images are ready t if(!empty($stderr)) { Console::error($stderr); } - }); + // }); } -}); +// }); $warmupEnd = \microtime(true); $warmupTime = $warmupEnd - $warmupStart;