def __init__(self, engine, config_dict): global run_length super(Stopper, self).__init__(engine) self.last_ts = time.time() + run_length * 3600 engine.bind(nimbus.NEW_ARCHIVE_RECORD, self.new_archive_record)