From 8e290731e496249806de04cbd5a854ef5f5c9396 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Tue, 21 Jul 2020 10:57:28 +0300 Subject: [PATCH] Async warmup --- app/workers/functions.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/workers/functions.php b/app/workers/functions.php index 902fa479f..c3a412f8c 100644 --- a/app/workers/functions.php +++ b/app/workers/functions.php @@ -22,6 +22,8 @@ $environments = Config::getParam('environments'); $warmupStart = \microtime(true); Co\run(function() use ($environments) { + Swoole\Runtime::enableCoroutine(SWOOLE_HOOK_ALL); + foreach($environments as $environment) { // Warmup: make sure images are ready to run fast 🚀 go(function() use ($environment) { $stdout = '';