Exemplo n.º 1
0
def construct_system_log(system_log_address):
    syslog = SystemLog()
    syslog.for_all.before(lambda ctxt: ModelMeta.session_start())
    syslog.for_all.after(lambda ctxt: ModelMeta.session_end())
    Executor(syslog, system_log_address).run()
Exemplo n.º 2
0
def construct_scheduler(tasks_address, scheduler_address):
    scheduler = wscheduler.Scheduler(Client(tasks_address))
    scheduler_executor = Executor(scheduler, scheduler_address)
    scheduler.for_all.before(lambda ctxt: ModelMeta.session_start())
    scheduler.for_all.after(lambda ctxt: ModelMeta.session_end())
    Executor(scheduler, scheduler_address).run()
Exemplo n.º 3
0
def wrap_session(extension, clients):
    log.debug('DB session for %r', extension)
    extension.for_all.before(lambda ctxt: ModelMeta.session_start())
    extension.for_all.after(lambda ctxt: ModelMeta.session_end())
Exemplo n.º 4
0
def end_solar_session(task_id, task, *args, **kwargs):
    ModelMeta.session_end()
Exemplo n.º 5
0
def start_solar_session(task_id, task, *args, **kwargs):
    ModelMeta.session_start()
Exemplo n.º 6
0
def wrap_session(extension, clients):
    log.debug('DB session for %r', extension)
    extension.for_all.before(lambda ctxt: ModelMeta.session_start())
    extension.for_all.after(lambda ctxt: ModelMeta.session_end())