Пример #1
0
 def list_events(self,
                 key: Union[str, Tuple[str]],
                 version: int = None,
                 event_type: str = None,
                 start_time: int = None,
                 namespace: str = None):
     return EventModel.list_events(key, version, event_type, start_time, namespace)
 def _sync_event_to_db(self, event: Event, session=None):
     EventModel.sync_event(event=event, session=session)
Пример #3
0
 def clean_up(self):
     EventModel.cleanup()
Пример #4
0
 def get_latest_version(self, key: str, namespace: str = None):
     return EventModel.get_latest_version()
Пример #5
0
 def list_all_events_from_version(self, start_version: int, end_version: int = None):
     return EventModel.list_all_events_from_version(start_version, end_version)
Пример #6
0
 def list_all_events(self, start_time: int):
     return EventModel.list_all_events(start_time)
Пример #7
0
 def add_event(self, event: BaseEvent, uuid: str):
     return EventModel.add_event(event, uuid)
Пример #8
0
 def __init__(self, db_conn=None, create_table_if_not_exists=True):
     if db_conn is not None:
         db.SQL_ALCHEMY_CONN = db_conn
     if create_table_if_not_exists:
         EventModel.create_table(db.SQL_ALCHEMY_CONN)