mirror of
https://github.com/ershisan99/coolify.git
synced 2025-12-17 04:59:30 +00:00
Able to add scheduled backups through the UI
This commit is contained in:
@@ -11,6 +11,7 @@ use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Foundation\Bus\Dispatchable;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Queue\Middleware\WithoutOverlapping;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Throwable;
|
||||
|
||||
@@ -35,6 +36,16 @@ class BackupDatabaseJob implements ShouldQueue
|
||||
$this->status = $this->database->status;
|
||||
}
|
||||
|
||||
public function middleware(): array
|
||||
{
|
||||
return [new WithoutOverlapping($this->backup->id)];
|
||||
}
|
||||
|
||||
public function uniqueId(): int
|
||||
{
|
||||
return $this->backup->id;
|
||||
}
|
||||
|
||||
public function handle()
|
||||
{
|
||||
if ($this->status !== 'running') {
|
||||
|
||||
Reference in New Issue
Block a user