From 44f9390790e45ce62f74dc7fd1f38a10bf8bc23b Mon Sep 17 00:00:00 2001 From: wh1te909 Date: Wed, 20 Apr 2022 00:35:02 +0000 Subject: [PATCH] fix task call --- api/tacticalrmm/core/views.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/api/tacticalrmm/core/views.py b/api/tacticalrmm/core/views.py index aadc54c6..fd2d7773 100644 --- a/api/tacticalrmm/core/views.py +++ b/api/tacticalrmm/core/views.py @@ -108,12 +108,9 @@ def server_maintenance(request): return Response("Nats configuration was reloaded successfully.") if request.data["action"] == "rm_orphaned_tasks": - from agents.models import Agent from autotasks.tasks import remove_orphaned_win_tasks - for agent in Agent.online_agents(): - remove_orphaned_win_tasks.delay(agent.pk) - + remove_orphaned_win_tasks.delay() return Response( "The task has been initiated. Check the Debug Log in the UI for progress." )