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