ajout exitcode dans RunFile
This commit is contained in:
parent
4eaac65be3
commit
be6061f59e
|
@ -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";
|
||||
|
|
Loading…
Reference in New Issue