##// END OF EJS Templates
tasks: include hours in stat keys
ergo -
Show More
@@ -203,8 +203,8 b' def add_reports(resource_id, request_params, dataset, **kwargs):'
203 203 redis_pipeline.incr(key, total_reports)
204 204 redis_pipeline.expire(key, 3600 * 24 * 7)
205 205 redis_pipeline.sadd(
206 REDIS_KEYS['apps_that_got_new_data_per_hour'],
207 resource_id, current_time.replace(minute=0))
206 REDIS_KEYS['apps_that_got_new_data_per_hour'].format(
207 current_time.replace(minute=0)), resource_id)
208 208 redis_pipeline.execute()
209 209
210 210 add_reports_es(es_report_group_docs, es_report_docs)
@@ -322,8 +322,8 b' def add_logs(resource_id, request_params, dataset, **kwargs):'
322 322 redis_pipeline.incr(key, total_logs)
323 323 redis_pipeline.expire(key, 3600 * 24 * 7)
324 324 redis_pipeline.sadd(
325 REDIS_KEYS['apps_that_got_new_data_per_hour'],
326 resource_id, current_time.replace(minute=0))
325 REDIS_KEYS['apps_that_got_new_data_per_hour'].format(
326 current_time.replace(minute=0)), resource_id)
327 327 redis_pipeline.execute()
328 328 add_logs_es(es_docs)
329 329 return True
@@ -380,8 +380,8 b' def add_metrics(resource_id, request_params, dataset, proto_version):'
380 380 redis_pipeline.incr(key, len(rows))
381 381 redis_pipeline.expire(key, 3600 * 24 * 7)
382 382 redis_pipeline.sadd(
383 REDIS_KEYS['apps_that_got_new_data_per_hour'],
384 resource_id, current_time.replace(minute=0))
383 REDIS_KEYS['apps_that_got_new_data_per_hour'].format(
384 current_time.replace(minute=0)), resource_id)
385 385 redis_pipeline.execute()
386 386 add_metrics_es(es_docs)
387 387 return True
@@ -53,7 +53,7 b' REDIS_KEYS = {'
53 53 'per_application_metrics_rate_limit': BASE.format(
54 54 'per_application_metrics_rate_limit:{}:{}'),
55 55 },
56 'apps_that_got_new_data_per_hour': BASE.format('apps_that_got_new_data_per_hour'),
56 'apps_that_got_new_data_per_hour': BASE.format('apps_that_got_new_data_per_hour:{}'),
57 57 'apps_that_had_reports': BASE.format('apps_that_had_reports'),
58 58 'apps_that_had_error_reports': BASE.format('apps_that_had_error_reports'),
59 59 'apps_that_had_reports_alerting': BASE.format(
General Comments 0
You need to be logged in to leave comments. Login now