refactor: streamline job status retrieval and clean up repository interface
- 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.
This commit is contained in:
@@ -16,9 +16,4 @@ interface CustomJobRepositoryInterface extends JobRepository
|
||||
* Get the count of jobs with a specific status.
|
||||
*/
|
||||
public function countJobsByStatus(string $status): int;
|
||||
|
||||
/**
|
||||
* Get jobs that have been running longer than a specified duration in seconds.
|
||||
*/
|
||||
public function getLongRunningJobs(int $seconds): Collection;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user