コード例 #1
0
ファイル: api.py プロジェクト: qiwihui/alienvault-ossim
def then_verify_job_with_var_id(context, var_jobid,var_task_type,var_wait):
    jid = context.alienvault.get (var_jobid)
    assert jid != None, "Bad job_id %s" % var_jobid
    # This is a celery.events.Event
    #wait 
    time.sleep(float(var_wait))
    ev = CeleryManager.get_job_status (jid)
    assert ev !=None, "No status for task %s in celery_job"
    assert ev['type'] == var_task_type, "Bad type  for task id: %s  Real: %s Must be:%s" % (var_jobid,ev['type'],var_task_type)
コード例 #2
0
def then_verify_job_with_var_id(context, var_jobid, var_task_type, var_wait):
    jid = context.alienvault.get(var_jobid)
    assert jid != None, "Bad job_id %s" % var_jobid
    # This is a celery.events.Event
    #wait
    time.sleep(float(var_wait))
    ev = CeleryManager.get_job_status(jid)
    assert ev != None, "No status for task %s in celery_job"
    assert ev[
        'type'] == var_task_type, "Bad type  for task id: %s  Real: %s Must be:%s" % (
            var_jobid, ev['type'], var_task_type)
コード例 #3
0
ファイル: api.py プロジェクト: qiwihui/alienvault-ossim
def then_get_jobid_result (context,var_jobid):
    ev = CeleryManager.get_job_status (context.alienvault[var_jobid])
コード例 #4
0
def then_get_jobid_result(context, var_jobid):
    ev = CeleryManager.get_job_status(context.alienvault[var_jobid])