diff --git a/app/http.php b/app/http.php index 295c936..5dc9e98 100644 --- a/app/http.php +++ b/app/http.php @@ -125,6 +125,7 @@ $table->column('status', Table::TYPE_STRING, 256); $table->column('key', Table::TYPE_STRING, 1024); $table->column('listening', Table::TYPE_INT, 1); + $table->column('image', Table::TYPE_STRING, 1024); $table->create(); return $table; @@ -490,6 +491,7 @@ function cleanUp(Orchestration $orchestration, Table $activeRuntimes, array $net $runtimeHostname = \uniqid(); + $log->addTag('image', $image); $log->addTag('version', $version); $log->addTag('runtimeId', $runtimeName); @@ -515,6 +517,7 @@ function cleanUp(Orchestration $orchestration, Table $activeRuntimes, array $net 'updated' => $startTime, 'status' => 'pending', 'key' => $secret, + 'image' => $image, ]); /** @@ -880,6 +883,7 @@ function (string $runtimeId, ?string $payload, string $path, string $method, mix $runtimeName = System::getHostname() . '-' . $runtimeId; + $log->addTag('image', $image); $log->addTag('version', $version); $log->addTag('runtimeId', $runtimeName); @@ -982,6 +986,9 @@ function (string $runtimeId, ?string $payload, string $path, string $method, mix // Update swoole table $runtime = $activeRuntimes->get($runtimeName) ?? []; + + $log->addTag('image', $runtime['image']); + $runtime['updated'] = \time(); $activeRuntimes->set($runtimeName, $runtime);