Skip to content

Commit

Permalink
Merge pull request #246 from ImMin5/master
Browse files Browse the repository at this point in the history
Fix delete cost parameter order
  • Loading branch information
ImMin5 authored Jun 24, 2024
2 parents ed34f03 + 6fa2b6f commit 9dd9db8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/spaceone/cost_analysis/service/job_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ def _close_job(
raise e

try:
self._delete_old_cost_data(domain_id, data_source_id)
self._delete_old_cost_data(data_source_id, domain_id)
except Exception as e:
_LOGGER.error(
f"[_close_job] delete old cost data error: {e}", exc_info=True
Expand Down Expand Up @@ -720,7 +720,7 @@ def _update_last_sync_time(self, job_vo: Job):
{"last_synchronized_at": job_vo.created_at}, data_source_vo
)

def _delete_old_cost_data(self, data_source_id, domain_id):
def _delete_old_cost_data(self, data_source_id: str, domain_id: str):
now = datetime.utcnow().date()
old_billed_month = (now - relativedelta(months=12)).strftime("%Y-%m")
old_billed_year = (now - relativedelta(months=36)).strftime("%Y")
Expand Down

0 comments on commit 9dd9db8

Please sign in to comment.