Skip to content

Commit

Permalink
fix: fix metric 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 29, 2024
1 parent d69815d commit fd5534f
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/spaceone/inventory/manager/job_task_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,14 @@ def make_failure_by_vo(
finished_at=datetime.utcnow(),
)

if collecting_count_info:
self._update_collecting_count_info(job_task_vo, collecting_count_info)

self.decrease_remained_sub_tasks(job_task_vo)
self.decrease_remained_sub_tasks(job_task_vo, collecting_count_info)

def decrease_remained_sub_tasks(
self, job_task_vo: JobTask, collecting_count_info: dict = None
) -> JobTask:
if collecting_count_info:
self._update_collecting_count_info(job_task_vo, collecting_count_info)

job_task_vo: JobTask = job_task_vo.decrement("remained_sub_tasks")
if job_task_vo.remained_sub_tasks == 0:
job_mgr: JobManager = self.locator.get_manager(JobManager)
Expand All @@ -165,9 +165,6 @@ def decrease_remained_sub_tasks(
job_task_vo.job_id, job_task_vo.domain_id
)

if collecting_count_info:
self._update_collecting_count_info(job_task_vo, collecting_count_info)

return job_task_vo

@staticmethod
Expand Down

0 comments on commit fd5534f

Please sign in to comment.