示例#1
0
def schedule(plan_uid, dg):
    tasks = traverse(dg)
    limit_chain = limits.get_default_chain(
        dg, [t for t in dg if dg.node[t]['status'] == 'INPROGRESS'], tasks)
    execution = executor.celery_executor(dg,
                                         limit_chain,
                                         control_tasks=('fault_tolerance', ))
    graph.save_graph(dg)
    execution()
示例#2
0
文件: tasks.py 项目: rustyrobot/solar
def schedule(plan_uid, dg):
    tasks = traverse(dg)
    limit_chain = limits.get_default_chain(
        dg,
        [t for t in dg if dg.node[t]['status'] == 'INPROGRESS'],
        tasks)
    execution = executor.celery_executor(
        dg, limit_chain, control_tasks=('fault_tolerance',))
    graph.save_graph(dg)
    execution()
示例#3
0
def test_celery_executor(mapp, dg):
    """Just check that it doesnt fail for now.
    """
    assert executor.celery_executor(dg, ['t1'])
    assert dg.node['t1']['status'] == 'INPROGRESS'