Skip to content

Commit

Permalink
refactor: change cost cache policy
Browse files Browse the repository at this point in the history
  • Loading branch information
whdalsrnt committed Nov 17, 2023
1 parent 605d852 commit eafa468
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/spaceone/cost_analysis/conf/global_conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
# Job Settings
JOB_TIMEOUT = 600
DATA_SOURCE_SYNC_HOUR = 16 # Hour (UTC)
COST_QUERY_CACHE_TIME = 3 # Day
COST_QUERY_CACHE_TIME = 4 # Day

DEFAULT_EXCHANGE_RATE = {
# 'KRW': 1178.7,
Expand Down
2 changes: 1 addition & 1 deletion src/spaceone/cost_analysis/manager/job_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def stat_jobs(self, query):
return self.job_model.stat(**query)

def preload_cost_stat_queries(self, domain_id, data_source_id):
cost_query_cache_time = config.get_global('COST_QUERY_CACHE_TIME', 3)
cost_query_cache_time = config.get_global('COST_QUERY_CACHE_TIME', 4)
cache_time = datetime.utcnow() - timedelta(days=cost_query_cache_time)

query = {
Expand Down

0 comments on commit eafa468

Please sign in to comment.