Fix query to avoid pruning actively running backups (#3379)

This commit is contained in:
Matthew Penner 2021-05-27 16:33:43 -06:00 committed by GitHub
parent 010ef8621b
commit c5b6d0bf45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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) {