@app.route('/api/work_queue/<string:queue_name>/finish', methods=['POST'])
@auth.superuser_api_key_required
@utils.retryable_transaction()
def handle_finish(queue_name):
    task_id = request.form.get('task_id', type=str)
    owner = request.form.get('owner', request.remote_addr, type=str)
    error = request.form.get('error', type=str) is not None
    try:
        work_queue.finish(queue_name, task_id, owner, error=error)
    except work_queue.Error, e:
        return utils.jsonify_error(e)

    db.session.commit()
    logging.debug('Task finished: queue=%r, task_id=%r, owner=%r, error=%r',
                  queue_name, task_id, owner, error)
    return flask.jsonify(success=True)
Marks a task on a queue as finished.
dataset/ETHPy150Open bslatkin/dpxdt/dpxdt/server/work_queue_handlers.py/handle_finish