162dc48c53590b4d0ca7725fa01aeb4af1089bd0,server/website/website/views.py,,give_result,#Any#Any#,951
Before Change
content_type="application/json")
elif overall_status in ("FAILURE", "REVOKED", "RETRY"):
msg = "STATUS: {}\nRESULT ID: {}\n".format(overall_status, lastest_result)
if tasks:
failed_task_idx = min(len(tasks) - 1, num_completed + 1)
failed_task = tasks[failed_task_idx]
msg += "TRACEBACK: {}".format(failed_task.traceback)
response = HttpResponse(msg, status=400)
else: // overall_status in ("PENDING", "RECEIVED", "STARTED"):
response = HttpResponse("{}: Result not ready".format(overall_status), status=202)
After Change
response = _failed_response(latest_result, tasks, num_completed, overall_status,
"Failed to get the next configuration.")
else:
response = HttpResponse(JSONUtil.dumps(next_config),
content_type="application/json")
elif overall_status in ("FAILURE", "REVOKED", "RETRY"):
response = _failed_response(latest_result, tasks, num_completed, overall_status,
"Celery failed to get the next configuration.")
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 5
Instances Project Name: cmu-db/ottertune
Commit Name: 162dc48c53590b4d0ca7725fa01aeb4af1089bd0
Time: 2019-10-08
Author: dvanaken@cs.cmu.edu
File Name: server/website/website/views.py
Class Name:
Method Name: give_result
Project Name: regel/loudml
Commit Name: 1f9b13ec98b3b0f2443caf549f69790a52cc0a70
Time: 2020-04-13
Author: sebastien.regel@gmail.com
File Name: loudml/opentsdb.py
Class Name: OpenTSDBClient
Method Name: put
Project Name: RasaHQ/rasa
Commit Name: 13e5fb6abb1223e377886469e48945477a7fcf28
Time: 2018-10-23
Author: alan@golastmile.com
File Name: rasa_core/training/structures.py
Class Name: Story
Method Name: as_story_string
Project Name: SeldonIO/seldon-core
Commit Name: 651993313aeb5892963b5b5e019bb2a949c82b64
Time: 2019-02-11
Author: gsunner2000@gmail.com
File Name: examples/cicd-argocd/seldon-core/do-rest-request-LOCALHOST.py
Class Name:
Method Name: rest_request