backups: default is_successful to false (#3522)
* backups: default is_successful to false * backups: properly query backups
This commit is contained in:
parent
b19a1640f0
commit
970f281859
8 changed files with 54 additions and 10 deletions
|
@ -25,7 +25,10 @@ class BackupRepository extends EloquentRepository
|
|||
return $this->getBuilder()
|
||||
->withTrashed()
|
||||
->where('server_id', $server)
|
||||
->where('is_successful', true)
|
||||
->where(function ($query) {
|
||||
$query->whereNull('completed_at')
|
||||
->orWhere('is_successful', '=', true);
|
||||
})
|
||||
->where('created_at', '>=', Carbon::now()->subSeconds($seconds)->toDateTimeString())
|
||||
->get()
|
||||
->toBase();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue