File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -119,7 +119,9 @@ async def last_metrics(namespace):
119119 if not settings .DRYCC_METRICS_CONFIG :
120120 return
121121 promql = query_last_metrics_promql_tpl % (
122- '|' .join (settings .DRYCC_METRICS_CONFIG .keys ()), namespace , '1m' )
122+ '|' .join (settings .DRYCC_METRICS_CONFIG .keys ()),
123+ namespace ,
124+ settings .DRYCC_METRICS_INTERVAL )
123125 url = urljoin (settings .DRYCC_PROMETHEUS_URL , "/api/v1/query" )
124126 params = {"query" : promql , "start" : int (time .time () - 60 )}
125127 async with aiohttp .ClientSession () as session :
Original file line number Diff line number Diff line change 281281 with open (DRYCC_METRICS_CONFIG_PATH ) as fd :
282282 DRYCC_METRICS_CONFIG = json .load (fd )
283283DRYCC_METRICS_EXPIRY = int (os .environ .get ('DRYCC_METRICS_EXPIRY' , '20' ))
284+ DRYCC_METRICS_INTERVAL = os .environ .get ('DRYCC_METRICS_INTERVAL' , '5m' )
284285
285286# security keys and auth tokens
286287random_secret = 'CHANGEME_sapm$s%upvsw5l_zuy_&29rkywd^78ff(qi*#@&*^'
You can’t perform that action at this time.
0 commit comments