 7582d7dd8b
			
		
	
	7582d7dd8b
	
	
	
		
			
			- Simplified the job status retrieval process by consolidating logic into a single `getJobStatus` function. - Removed redundant checks and methods from the `CustomJobRepositoryInterface` and `CustomJobRepository`. - Updated the `getHorizonJobStatus` method in `ApplicationDeploymentQueue` to directly utilize the new `getJobStatus` function. - Enhanced the `isThereAJobInProgress` method to improve clarity and maintainability.
		
			
				
	
	
		
			20 lines
		
	
	
		
			434 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			434 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| 
 | |
| namespace App\Contracts;
 | |
| 
 | |
| use Illuminate\Support\Collection;
 | |
| use Laravel\Horizon\Contracts\JobRepository;
 | |
| 
 | |
| interface CustomJobRepositoryInterface extends JobRepository
 | |
| {
 | |
|     /**
 | |
|      * Get all jobs with a specific status.
 | |
|      */
 | |
|     public function getJobsByStatus(string $status): Collection;
 | |
| 
 | |
|     /**
 | |
|      * Get the count of jobs with a specific status.
 | |
|      */
 | |
|     public function countJobsByStatus(string $status): int;
 | |
| }
 |