示例#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)
示例#2
0
文件: api.py 项目: GunioRobot/Tempo
def task_show(id):
    """Returns a specific task record by id"""
    return _new_response({resource_name: _make_task_dict(db.task_get(id))})