Skip to content

Commit

Permalink
Merge pull request #116 from whdalsrnt/master
Browse files Browse the repository at this point in the history
refactor: change cost cache policy
  • Loading branch information
whdalsrnt authored Nov 17, 2023
2 parents 605d852 + eafa468 commit b5007ce
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 b5007ce

Please sign in to comment.