mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Fix for swoole error
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user