mirror of
https://github.com/clearml/clearml-server
synced 2025-01-31 02:46:53 +00:00
Optimize queues.get_next_task to retrieve required task fields only
This commit is contained in:
parent
dff2ed34e8
commit
3729afe014
@ -171,7 +171,7 @@ def get_next_task(call: APICall, company_id, request: GetNextTaskRequest):
|
||||
if entry:
|
||||
data = {"entry": entry.to_proper_dict()}
|
||||
if request.get_task_info:
|
||||
task = Task.objects(id=entry.task).first()
|
||||
task = Task.objects(id=entry.task).only("company", "user").first()
|
||||
if task:
|
||||
data["task_info"] = {"company": task.company, "user": task.user}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user