From 4d2f5428a2f3e06f273e06cd5e6f3229f6c46cca Mon Sep 17 00:00:00 2001 From: Bradley Schofield Date: Thu, 22 Jul 2021 14:53:30 +0100 Subject: [PATCH] Update to use protected container class --- app/workers/functions.php | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/app/workers/functions.php b/app/workers/functions.php index ddac808c75..cb6608069d 100644 --- a/app/workers/functions.php +++ b/app/workers/functions.php @@ -384,7 +384,7 @@ class FunctionsV1 extends Worker $value = strval($value); }); - $response = $orchestration->run( + $id = $orchestration->run( $runtime['image'], $container, "", @@ -404,14 +404,13 @@ class FunctionsV1 extends Worker $executionEnd = \microtime(true); - $list[$container] = new Container(); - - $list[$container]->name = $container; - $list[$container]->status = "Up"; - $list[$container]->labels = array( - 'appwrite-type' => 'function', - 'appwrite-created' => "{$executionTime}", - ); + $list[$container] = new Container($container, + $id, + "Up", + array( + 'appwrite-type' => 'function', + 'appwrite-created' => "{$executionTime}", + )); Console::info("Function created in " . ($executionEnd - $executionStart) . " seconds"); }