Example #1
0
def _process_message(body, message):
    message.ack()

    task_uuid = body['task_uuid']

    try:
        task = db.task_get(task_uuid)
    except common_exception.NotFound:
        logger.error("Task '%(task_uuid)s' not found" % locals())
        return

    _perform_task(task)
Example #2
0
def task_show(id):
    """Returns a specific task record by id"""
    return _new_response({resource_name: _make_task_dict(db.task_get(id))})