diff --git a/src/file/app/RunFile.php b/src/file/app/RunFile.php index 6dee6ba..e99e7fd 100644 --- a/src/file/app/RunFile.php +++ b/src/file/app/RunFile.php @@ -42,10 +42,11 @@ class RunFile { "serial" => 0, "date_start" => $dateStart, "date_stop" => null, + "exitcode" => null, "action" => null, "action_date_start" => null, - "action_max_step" => null, "action_current_step" => null, + "action_max_step" => null, "action_date_step" => null, ]; } @@ -119,6 +120,14 @@ class RunFile { ])); } + /** après l'arrêt de l'application, mettre à jour le code de retour */ + function stopped(int $exitcode): void { + [$file, $data] = $this->willWrite(); + $file->serialize(self::merge($data, [ + "exitcode" => $exitcode, + ])); + } + function getLockFile(?string $name=null, ?string $title=null): LockFile { $ext = self::LOCK_EXT; if ($name !== null) $ext = ".$name$ext";