From c5b6d0bf458e77e1db403d7cc908304c79eedc65 Mon Sep 17 00:00:00 2001 From: Matthew Penner Date: Thu, 27 May 2021 16:33:43 -0600 Subject: [PATCH] Fix query to avoid pruning actively running backups (#3379) --- .../Commands/Maintenance/PruneOrphanedBackupsCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Console/Commands/Maintenance/PruneOrphanedBackupsCommand.php b/app/Console/Commands/Maintenance/PruneOrphanedBackupsCommand.php index 4aef591a2..71aeb4f30 100644 --- a/app/Console/Commands/Maintenance/PruneOrphanedBackupsCommand.php +++ b/app/Console/Commands/Maintenance/PruneOrphanedBackupsCommand.php @@ -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) {