@app.route('/check_worker_status', methods=['GET'])
def check_worker_status():
    if 'workerId' not in request.args:
        resp = {"status": "bad request"}
        return jsonify(**resp)
    else:
        worker_id = request.args['workerId']
        try:
            part = Participant.query.\
                filter(Participant.workerid == worker_id).one()
            status = part.status
        except exc.SQLAlchemyError:
            status = NOT_ACCEPTED
        resp = {"status" : status}
        return jsonify(**resp)
Check worker status route
dataset/ETHPy150Open NYUCCL/psiTurk/psiturk/experiment.py/check_worker_status