def __init__(self, listener, table_name): self.listener = listener self.table_name = table_name if not StatusSource.table_exists(table_name): raise DbException('table does not exist')
def disconnect(self): self.running = False StatusSource.get_saved_stream(self.source).unregister(self)
def __init__(self, batch_size, tablename): super(DbInsertStatusHandler, self).__init__(batch_size) if StatusSource.engine == None: StatusSource.set_engine() self.tablename = tablename
def __init__(self, listener, source): self.listener = listener self.source = source self.source_handler = StatusSource.get_saved_stream(source) self.source_handler.register(self) self.running = False
def __init__(self, batch_size, name): super(ToStreamStatusHandler, self).__init__(batch_size) self.clients = set() StatusSource.register_saved_stream(name, self)