diff --git a/api/tacticalrmm/agents/tasks.py b/api/tacticalrmm/agents/tasks.py index 06ea9f5f..cdbda59b 100644 --- a/api/tacticalrmm/agents/tasks.py +++ b/api/tacticalrmm/agents/tasks.py @@ -29,26 +29,6 @@ def _check_agent_service(pk: int) -> None: asyncio.run(agent.nats_cmd(data, wait=False)) -def _check_in_full(pk: int) -> None: - agent = Agent.objects.get(pk=pk) - asyncio.run(agent.nats_cmd({"func": "checkinfull"}, wait=False)) - - -@app.task -def check_in_task() -> None: - q = Agent.objects.only("pk", "version") - agents: List[int] = [ - i.pk for i in q if pyver.parse(i.version) == pyver.parse("1.1.12") - ] - chunks = (agents[i : i + 50] for i in range(0, len(agents), 50)) - for chunk in chunks: - for pk in chunk: - _check_in_full(pk) - sleep(0.1) - rand = random.randint(3, 7) - sleep(rand) - - @app.task def monitor_agents_task() -> None: q = Agent.objects.only("pk", "version", "last_seen", "overdue_time") diff --git a/api/tacticalrmm/tacticalrmm/celery.py b/api/tacticalrmm/tacticalrmm/celery.py index f3b92269..b880fbd9 100644 --- a/api/tacticalrmm/tacticalrmm/celery.py +++ b/api/tacticalrmm/tacticalrmm/celery.py @@ -29,10 +29,6 @@ app.conf.beat_schedule = { "task": "winupdate.tasks.check_agent_update_schedule_task", "schedule": crontab(minute=5, hour="*"), }, - "agents-checkinfull": { - "task": "agents.tasks.check_in_task", - "schedule": crontab(minute="*/24"), - }, "agent-auto-update": { "task": "agents.tasks.auto_self_agent_update_task", "schedule": crontab(minute=35, hour="*"),