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:
Andras Bacsai
2025-01-10 19:53:13 +01:00
parent a0fc46dee4
commit 7582d7dd8b
5 changed files with 9 additions and 54 deletions

View File

@@ -72,10 +72,6 @@ class ApplicationDeploymentQueue extends Model
public function getHorizonJobStatus()
{
if (! $this->horizon_job_id) {
return 'unknown';
}
return getJobStatus($this->horizon_job_id);
}