Optimize task manager with debug toolbar, adjust prefetch (#12588)

This commit is contained in:
Alan Rominger
2022-07-28 15:38:26 -04:00
committed by Seth Foster
parent e6f8852b05
commit f7e6a32444
6 changed files with 27 additions and 32 deletions

View File

@@ -403,7 +403,7 @@ class AutoscalePool(WorkerPool):
if current_task and isinstance(current_task, dict):
endings = ['tasks.task_manager', 'tasks.dependency_manager', 'tasks.workflow_manager']
current_task_name = current_task.get('task', '')
if any([current_task_name.endswith(e) for e in endings]):
if any(current_task_name.endswith(e) for e in endings):
if 'started' not in current_task:
w.managed_tasks[current_task['uuid']]['started'] = time.time()
age = time.time() - current_task['started']