예제 #1
0
def run_collector():
    LOG.info("Starting collector..")
    gevent.signal(signal.SIGQUIT, gevent.kill)
    redis_flush_keys()
    get_device_list()
    create_cluster_tables()
    create_daily_tables()
    try:
        tasks = [run_scheduler, run_store_ingestion, run_process_counters, run_request_parser, run_request_fetch]
        g_thread_pool = [gevent.spawn(task) for task in tasks]
        gevent.joinall(g_thread_pool)
    except KeyboardInterrupt:
        print "Keyboard interrupt.."
    finally:
        #pass
        gevent.killall(g_thread_pool, exception=gevent.GreenletExit)
예제 #2
0
def run_collector():
    LOG.info("Starting collector..")
    gevent.signal(signal.SIGQUIT, gevent.kill)
    redis_flush_keys()
    get_device_list()
    create_cluster_tables()
    create_daily_tables()
    try:
        tasks = [
            run_scheduler, run_store_ingestion, run_process_counters,
            run_request_parser, run_request_fetch
        ]
        g_thread_pool = [gevent.spawn(task) for task in tasks]
        gevent.joinall(g_thread_pool)
    except KeyboardInterrupt:
        print "Keyboard interrupt.."
    finally:
        #pass
        gevent.killall(g_thread_pool, exception=gevent.GreenletExit)
예제 #3
0
 def create_daily_cf_job():
     tomorrow = date.today() + timedelta(days=1)
     tomorrow_strf = tomorrow.strftime('%m%d%Y')
     LOG.info("Creating tables for date: " + tomorrow_strf)
     create_daily_tables(tomorrow_strf)
예제 #4
0
 def create_daily_cf_job():
     tomorrow = date.today()+timedelta(days=1)
     tomorrow_strf = tomorrow.strftime('%m%d%Y')
     LOG.info("Creating tables for date: " + tomorrow_strf)
     create_daily_tables(tomorrow_strf)