Fix query to avoid pruning actively running backups (#3379)
This commit is contained in:
		
							parent
							
								
									010ef8621b
								
							
						
					
					
						commit
						c5b6d0bf45
					
				| @ -28,7 +28,7 @@ class PruneOrphanedBackupsCommand extends Command | |||||||
| 
 | 
 | ||||||
|         $query = $repository->getBuilder() |         $query = $repository->getBuilder() | ||||||
|             ->whereNull('completed_at') |             ->whereNull('completed_at') | ||||||
|             ->whereDate('created_at', '<=', CarbonImmutable::now()->subMinutes($since)); |             ->where('created_at', '<=', CarbonImmutable::now()->subMinutes($since)->toDateTimeString()); | ||||||
| 
 | 
 | ||||||
|         $count = $query->count(); |         $count = $query->count(); | ||||||
|         if (!$count) { |         if (!$count) { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Matthew Penner
						Matthew Penner