mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-14 14:17:18 +00:00
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:
1 parent
a0fc46dee4
commit
7582d7dd8b
5 files changed
+9
-54
No files matched your search
@@ -173,11 +173,6 @@ class HorizonManage extends Command
|
||||
|
||||
public function getJobStatus(string $jobId)
|
||||
{
|
||||
$jobFound = app(JobRepository::class)->getJobs([$jobId]);
|
||||
if ($jobFound->isEmpty()) {
|
||||
return 'unknown';
|
||||
}
|
||||
|
||||
return $jobFound->first()->status;
|
||||
return getJobStatus($jobId);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user