Skip to content

Commit

Permalink
minor changes in task_queues api
Browse files Browse the repository at this point in the history
  • Loading branch information
kartikvirendrar committed Oct 15, 2024
1 parent f8f450a commit 1f1849d
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions backend/task/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -3193,6 +3193,8 @@ def inspect_queue(self, request):
)
elif elem["name"] == "task.tasks.celery_nmt_call":
task_obj["task_id"] = eval(elem["kwargs"])["task_id"]
elif elem["name"] == "task.tasks.celery_nmt_tts_call":
task_obj["task_id"] = eval(elem["kwargs"])["task_id"]
else:
task_obj["task_id"] = ""

Expand Down Expand Up @@ -3230,19 +3232,21 @@ def inspect_queue(self, request):
)
else:
if queue == "nmt":
queue_type = "celery@nmt_worker"
queue_type = "task.tasks.celery_nmt_call"
elif queue == "tts":
queue_type = "celery@asr_tts_worker"
queue_type = "task.tasks.celery_tts_call"
elif queue == "nmt_tts":
queue_type = "task.tasks.celery_nmt_tts_call"
else:
queue_type = "celery@asr_tts_worker"
queue_type = "task.tasks.celery_asr_call"

try:
task_list = []
url = f"{flower_url}/api/tasks"
params = {
"state": "STARTED",
"sort_by": "received",
"workername": queue_type,
"name": queue_type,
}
if flower_username and flower_password:
res = requests.get(
Expand Down

0 comments on commit 1f1849d

Please sign in to comment.