

def on_delete(self, req, resp, session_id, job_id):
    '\n        remove a job from the session\n\n        :param req:\n        :param resp:\n        :param session_id:\n        :param job_id:\n        :return:\n        '
    user_id = (req.get_header('X-User-ID') or '')
    session_doc = self.db.get_session(user_id=user_id, session_id=session_id)
    session_doc['jobs'].pop(job_id, None)
    self.db.replace_session(user_id=user_id, session_id=session_id, doc=session_doc)
    job_update_doc = {
        'session_id': '',
        'session_tag': 0,
        'job_schedule': {
            'event': 'stop',
        },
    }
    self.db.update_job(user_id=user_id, job_id=job_id, patch_doc=job_update_doc)
    resp.status = falcon.HTTP_204

dataset/ETHPy150Open openstack/freezer-api/freezer_api/api/v1/sessions.py SessionsJob.on_delete/original