Exemple #1
0
 def send_summary(self, data):
     summary_dict = proto_util.dict_from_proto_list(data.summary.update)
     json_summary = json.dumps(summary_dict)
     if self._fs:
         self._fs.push(filenames.SUMMARY_FNAME, json_summary)
     # TODO(jhr): we should only write this at the end of the script
     summary_path = os.path.join(self._settings.files_dir,
                                 filenames.SUMMARY_FNAME)
     with open(summary_path, "w") as f:
         f.write(json_summary)
     self._save_file(filenames.SUMMARY_FNAME)
Exemple #2
0
 def send_history(self, data):
     history = data.history
     history_dict = proto_util.dict_from_proto_list(history.item)
     self._save_history(history_dict)
Exemple #3
0
 def handle_history(self, record):
     self._dispatch_record(record)
     self._save_history(record)
     history_dict = proto_util.dict_from_proto_list(record.history.item)
     self._consolidated_summary.update(history_dict)
     self._save_summary(self._consolidated_summary)