fix: delete resource if there was an error

fix: do not refresh on containerStatusJob (db view)
This commit is contained in:
Andras Bacsai
2023-10-14 17:26:16 +02:00
parent 0ef386b4a8
commit bc3e59e4ef
5 changed files with 5 additions and 6 deletions

View File

@@ -45,10 +45,11 @@ class StopResourceJob implements ShouldQueue, ShouldBeEncrypted
StopService::run($this->resource);
break;
}
$this->resource->delete();
} catch (\Throwable $e) {
send_internal_notification('ContainerStoppingJob failed with: ' . $e->getMessage());
throw $e;
} finally {
$this->resource->delete();
}
}
}