Esempio n. 1
0
def register_event(etype, info, prior=EVENT_DEFAULT_PRIOR):
    # skip forwarder files
    if FORWARDER_LOG_PREFIX in info:
        return
    logging.debug('register_event {} - {}'.format(etype, info))
    raised = get_sdatetime()
    r.rpush('unhandled', (prior, etype, info, raised))
Esempio n. 2
0
def update_cache_info():
    logging.debug('update_cache_info')
    r.set('last_cached', get_sdatetime())
Esempio n. 3
0
def start_run(path, total):
    start_dt = get_sdatetime()
    info = {'start': start_dt, 'cur': 0, 'total': total, 'error': None}
    r.hmset(u'run:{}'.format(path), info)