Skip to content

Commit

Permalink
refactor: optimize performance
Browse files Browse the repository at this point in the history
Signed-off-by: Jongmin Kim <[email protected]>
  • Loading branch information
whdalsrnt committed Oct 15, 2024
1 parent fee3ebc commit bc29e98
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/spaceone/cost_analysis/service/job_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -814,12 +814,13 @@ def _delete_changed_cost_data(
if end:
query["filter"].append({"k": "billed_month", "v": end, "o": "lte"})

job_ids = self._distinct_job_id(
copy.deepcopy(query["filter"]), domain_id, job_vo.data_source_id
)

for key, value in change_filter.items():
query["filter"].append({"k": key, "v": value, "o": "eq"})

job_ids = self._distinct_job_id(
query["filter"], domain_id, job_vo.data_source_id
)
for job_id in job_ids:
if job_vo.job_id == job_id:
continue
Expand Down

0 comments on commit bc29e98

Please sign in to comment.