File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -451,6 +451,9 @@ def es_send_external_stats(
451451 es_index_name = "externals_stats_summary" ,
452452 es_doc_name = "externals-stats-summary" ,
453453):
454+ sdata = get_summary_stats_from_json_file (stats_dict_file_path , cpu_normalize )
455+ if not sdata :
456+ return
454457 file_stamp = int (tstat (stats_dict_file_path ).st_mtime ) # get the file stamp from the file
455458 week = epoch2week (file_stamp )
456459 with open (opts_dict_file_path , "r" ) as opts_dict_f :
@@ -459,7 +462,6 @@ def es_send_external_stats(
459462 index_sha = sha1 (
460463 ("" .join ([str (x ) for x in opts_dict .values ()]) + stats_dict_file_path ).encode ()
461464 ).hexdigest ()
462- sdata = get_summary_stats_from_json_file (stats_dict_file_path , cpu_normalize )
463465 sdata .update (opts_dict )
464466 sdata ["@timestamp" ] = file_stamp * 1000
465467 try :
You can’t perform that action at this time.
0 commit comments