def write_catastrophe_record(self, *args, **kwargs):
if self.catastrophe_coordinator is not None:
if self.catastrophe_coordinator.should_log():
record = CatastropheRecord(*args, **kwargs)
filename = self.catastrophe_coordinator.get_filename()
with open(filename, "wb") as f:
pickler = pickle.Pickler(f)
pickler.dump(record)
self.catastrophe_coordinator.step()
评论列表
文章目录