-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add runtimejob handling additional apis #1197
Conversation
Signed-off-by: Akihiko Kuroda <[email protected]>
job = self.get_object() | ||
runtimejob = RuntimeJob( | ||
job=job, | ||
runtime_job=request.data.get("runtime_job"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we check that runtime_job
got passed in request somehow to display user friendly error?
Something like
if not request.data.get("runtime_job"):
return Response({"message": "Got empty `runtime_job` field. Please, specify `runtime_job`."}, code / status=400)
gateway/api/views.py
Outdated
ctx = TraceContextTextMapPropagator().extract(carrier=request.headers) | ||
with tracer.start_as_current_span("gateway.job.stop", context=ctx): | ||
job = self.get_object() | ||
runtimejobs = RuntimeJob.objects.all().filter(job=job) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
runtimejobs = RuntimeJob.objects.all().filter(job=job) | |
runtimejobs = RuntimeJob.objects.filter(job=job) |
@IceKhan13 Thanks for review. I updated both places. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @akihikokuroda !
Summary
Related to: #1163
Details and comments
Adding runtime job to the job:
list the runtime jobs created in the job: