Пример #1
0
 def detect_expired_session(cls):
     detect_logger().info('start detect expired session')
     sessions_record = StorageSessionBase.query_expired_sessions_record(
         ttl=5 * 60 * 60 * 1000)
     for session_record in sessions_record:
         detect_logger().info('start stop session id {}'.format(
             session_record.f_session_id))
         session = storage.Session.build(
             session_id=session_record.f_session_id,
             storage_engine=session_record.f_engine_name)
         session.destroy_session()
         detect_logger().info('session id {} success'.format(
             session_record.f_session_id))
Пример #2
0
 def persistent(cls,
                computing_table: CTableABC,
                namespace,
                name,
                schema=None,
                part_of_data=None,
                engine=None,
                engine_address=None,
                store_type=None,
                token: typing.Dict = None) -> StorageTableMetaABC:
     return StorageSessionBase.persistent(computing_table=computing_table,
                                          namespace=namespace,
                                          name=name,
                                          schema=schema,
                                          part_of_data=part_of_data,
                                          engine=engine,
                                          engine_address=engine_address,
                                          store_type=store_type,
                                          token=token)
Пример #3
0
 def get_table_meta(cls, name,
                    namespace) -> typing.Union[StorageTableMetaABC, None]:
     meta = StorageSessionBase.get_table_meta(name=name,
                                              namespace=namespace)
     return meta
Пример #4
0
 def detect_expired_session(cls):
     sessions_record = StorageSessionBase.query_expired_sessions_record(
         ttl=30 * 60 * 1000)
     for session_record in sessions_record:
         job_utils.start_session_stop()