fix: backups

This commit is contained in:
Andras Bacsai
2024-04-29 09:38:45 +02:00
parent ae12222687
commit bb6c9cf49e
17 changed files with 71 additions and 96 deletions

View File

@@ -289,7 +289,7 @@ class DatabaseBackupJob implements ShouldQueue, ShouldBeEncrypted
if ($this->backup->save_s3) {
$this->upload_to_s3();
}
$this->team?->notify(new BackupSuccess($this->backup, $this->database));
$this->team?->notify(new BackupSuccess($this->backup, $this->database, $database));
$this->backup_log->update([
'status' => 'success',
'message' => $this->backup_output,
@@ -305,8 +305,7 @@ class DatabaseBackupJob implements ShouldQueue, ShouldBeEncrypted
]);
}
send_internal_notification('DatabaseBackupJob failed with: ' . $e->getMessage());
$this->team?->notify(new BackupFailed($this->backup, $this->database, $this->backup_output));
throw $e;
$this->team?->notify(new BackupFailed($this->backup, $this->database, $this->backup_output, $database));
}
}
} catch (\Throwable $e) {