Skip to content

Commit

Permalink
fix: fix job status bug
Browse files Browse the repository at this point in the history
Signed-off-by: Jongmin Kim <[email protected]>
  • Loading branch information
whdalsrnt committed May 21, 2024
1 parent 117cc08 commit b04182a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/spaceone/inventory/manager/job_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,13 @@ def increase_failure_tasks(self, job_id: str, domain_id: str) -> None:
def decrease_remained_tasks_by_vo(self, job_vo: Job) -> None:
job_vo = job_vo.decrement("remained_tasks")

if job_vo.remained_tasks == 0 and job_vo.status != "CANCELED":
if job_vo.status == "IN_PROGRESS":
if job_vo.remained_tasks == 0 and job_vo.status == "IN_PROGRESS":
if job_vo.failure_tasks > 0:
self.make_failure_by_vo(job_vo)
else:
self.make_success_by_vo(job_vo)

if job_vo.success_tasks > 0:
self._delete_metric_cache(job_vo.plugin_id, job_vo.domain_id)

@staticmethod
Expand Down

0 comments on commit b04182a

Please sign in to comment.