Esempio n. 1
0
    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')
Esempio n. 2
0
 def disconnect(self):
     self.running = False
     StatusSource.get_saved_stream(self.source).unregister(self)
Esempio n. 3
0
 def __init__(self, batch_size, tablename):
     super(DbInsertStatusHandler, self).__init__(batch_size)
     if StatusSource.engine == None:
         StatusSource.set_engine()
     self.tablename = tablename
Esempio n. 4
0
 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
Esempio n. 5
0
 def __init__(self, batch_size, name):
     super(ToStreamStatusHandler, self).__init__(batch_size)
     self.clients = set()
     StatusSource.register_saved_stream(name, self)