From 90ac87f217296af2c2df86c64447becc7942f3ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Mon, 17 Oct 2022 09:12:28 +0000 Subject: [PATCH] Document new TODOs --- app/executor.php | 1 + app/functionsProxy.php | 3 +++ 2 files changed, 4 insertions(+) diff --git a/app/executor.php b/app/executor.php index 81a36ddb56..68fcb02261 100644 --- a/app/executor.php +++ b/app/executor.php @@ -653,6 +653,7 @@ App::get('/v1/health') ->desc("Get usage stats of host machine CPU usage from 0 to 100.") ->inject('response') ->action(function (string $name, Response $response) use ($orchestrationPool) { + // TODO: @Meldiron separate into dedicated http server $systemCores = System::getCPUCores(); $systemUsage = System::getCPUUtilisation() / $systemCores; $functionsUsage = []; diff --git a/app/functionsProxy.php b/app/functionsProxy.php index a8edffd3d6..237426ab73 100644 --- a/app/functionsProxy.php +++ b/app/functionsProxy.php @@ -190,6 +190,7 @@ go(function () use ($redisPool) { Swoole\Event::wait(); +// TODO: @Meldiron Use async-style instead $http = new Server("0.0.0.0", 80); $payloadSize = 6 * (1024 * 1024); // 6MB @@ -250,6 +251,8 @@ $run = function (SwooleRequest $request, SwooleResponse $response) use ($adapter }; $http->on('start', function () use ($redisPool) { + // TODO: @Meldiron Allow scaling. Only do this on one machine + // Keep updating executors state Timer::tick(15000, function (int $timerId) use ($redisPool) { fetchExecutorsState($redisPool, false);