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))
def update_cache_info(): logging.debug('update_cache_info') r.set('last_cached', get_sdatetime())
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)