fix: coolify db backup

This commit is contained in:
Andras Bacsai 2023-09-30 20:54:05 +02:00
parent febc399568
commit 4daa1b8c16

View File

@ -62,7 +62,7 @@ public function handle(): void
{ {
try { try {
$status = Str::of(data_get($this->database, 'status')); $status = Str::of(data_get($this->database, 'status'));
if (!$status->startsWith('running')) { if (!$status->startsWith('running') && $this->database->id !== 0) {
ray('database not running'); ray('database not running');
return; return;
} }
@ -90,7 +90,6 @@ public function handle(): void
$this->upload_to_s3(); $this->upload_to_s3();
} }
$this->save_backup_logs(); $this->save_backup_logs();
// TODO: Notify user
} catch (\Throwable $e) { } catch (\Throwable $e) {
ray($e->getMessage()); ray($e->getMessage());
send_internal_notification('DatabaseBackupJob failed with: ' . $e->getMessage()); send_internal_notification('DatabaseBackupJob failed with: ' . $e->getMessage());