Fix query to avoid pruning actively running backups (#3379)
This commit is contained in:
parent
010ef8621b
commit
c5b6d0bf45
1 changed files with 1 additions and 1 deletions
|
@ -28,7 +28,7 @@ class PruneOrphanedBackupsCommand extends Command
|
|||
|
||||
$query = $repository->getBuilder()
|
||||
->whereNull('completed_at')
|
||||
->whereDate('created_at', '<=', CarbonImmutable::now()->subMinutes($since));
|
||||
->where('created_at', '<=', CarbonImmutable::now()->subMinutes($since)->toDateTimeString());
|
||||
|
||||
$count = $query->count();
|
||||
if (!$count) {
|
||||
|
|
Loading…
Reference in a new issue