code: 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)
docs: Marks a task on a queue as finished.