Skip to content

Commit c5b6d0b

Browse files
authored
Fix query to avoid pruning actively running backups (pterodactyl#3379)
1 parent 010ef86 commit c5b6d0b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/Console/Commands/Maintenance/PruneOrphanedBackupsCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function handle(BackupRepository $repository)
2828

2929
$query = $repository->getBuilder()
3030
->whereNull('completed_at')
31-
->whereDate('created_at', '<=', CarbonImmutable::now()->subMinutes($since));
31+
->where('created_at', '<=', CarbonImmutable::now()->subMinutes($since)->toDateTimeString());
3232

3333
$count = $query->count();
3434
if (!$count) {

0 commit comments

Comments
 (0)