Exemplo n.º 1
0
def daemon_loop():
    while True:
        try:
            job_queue = dismod3.disease_json.get_job_queue()
        except:
            job_queue = []
        
        for param_id in job_queue:
            job_params = dismod3.disease_json.remove_from_job_queue(param_id)
            id = int(job_params['dm_id'])
            fit_all.fit_all(id)
        time.sleep(dismod3.settings.SLEEP_SECS)
Exemplo n.º 2
0
def daemon_loop():
    while True:
        try:
            job_queue = dismod3.disease_json.get_job_queue()
        except:
            job_queue = []

        for param_id in job_queue:
            job_params = dismod3.disease_json.remove_from_job_queue(param_id)
            id = int(job_params['dm_id'])
            fit_all.fit_all(id)
        time.sleep(dismod3.settings.SLEEP_SECS)
Exemplo n.º 3
0
def daemon_loop():
    while True:
        try:
            job_queue = dismod3.get_job_queue()
        except:
            job_queue = []
        
        for param_id in job_queue:
            print 'processing job %d' % param_id
            job_params = dismod3.remove_from_job_queue(param_id)
            id = int(job_params['dm_id'])
            fit_all.fit_all(id)
            
        time.sleep(dismod3.settings.SLEEP_SECS)