Ejemplo n.º 1
0
async def async_main(context):
    context.task = get_task(context.config)

    # determine the task server and action
    context.server = get_task_server(context.task, context.config)
    context.action = get_task_action(context.task, context.config)

    # perform schema validation for the corresponding type of task
    validate_task_schema(context, action_map[context.action]['schema'])

    # perform the appropriate behavior
    await action_map[context.action]['function'](context)
Ejemplo n.º 2
0
async def async_main(context):
    # perform schema validation for the corresponding type of task
    validate_task_schema(context)

    # determine the task server and action
    context.server = get_task_server(context.task, context.config)
    context.action = get_task_action(context.task, context.config)

    # perform the appropriate behavior
    if action_map.get(context.action):
        await action_map[context.action](context)
    else:
        raise TaskVerificationError("Unknown action: {}!".format(context.action))
Ejemplo n.º 3
0
def test_validate_task_schema(submission_context,
                              schema="bouncer_submission_schema"):
    validate_task_schema(submission_context, schema)
Ejemplo n.º 4
0
def test_validate_task_schema(submission_context, schema="submission"):
    validate_task_schema(submission_context)