refactor: enhance ApplicationDeploymentJob and HorizonServiceProvider for improved job handling

- Removed the private property for application deployment queue ID in ApplicationDeploymentJob and utilized constructor property promotion.
- Added a tags method in ApplicationDeploymentJob to properly identify the worker running the job.
- Updated HorizonServiceProvider to handle cases where the deployment queue ID is blank, preventing potential errors during job processing.
- Cleaned up the isAnyDeploymentInprogress function by removing unnecessary whitespace.
This commit is contained in:
Andras Bacsai
2025-01-10 20:07:01 +01:00
parent 7582d7dd8b
commit 3a3219394d
3 changed files with 11 additions and 6 deletions

View File

@@ -1258,7 +1258,6 @@ function get_public_ips()
function isAnyDeploymentInprogress()
{
$runningJobs = ApplicationDeploymentQueue::where('horizon_job_worker', gethostname())->where('status', ApplicationDeploymentStatus::IN_PROGRESS->value)->get();
$horizonJobIds = [];
foreach ($runningJobs as $runningJob) {