Added session flushing
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
b62ebc85f9
commit
ef4d4cc740
@ -161,6 +161,7 @@ class JobView(FlaskView):
|
||||
# Perform starting job
|
||||
job = Job()
|
||||
db.session.add(job)
|
||||
db.session.flush()
|
||||
|
||||
job_desc['id'] = job.id
|
||||
job_desc['created_at'] = job.created_at
|
||||
@ -170,6 +171,7 @@ class JobView(FlaskView):
|
||||
controller = Controller()
|
||||
controller.job = job
|
||||
db.session.add(controller)
|
||||
db.session.flush()
|
||||
|
||||
pod_object = self._create_k8s_pod_api_object(controller, controller_desc)
|
||||
r = k8s.corev1api.create_namespaced_pod(current_app.config['WORKING_NAMESPACE'], pod_object)
|
||||
|
Loading…
Reference in New Issue
Block a user