From 4b37fe12d74a837b54fc573bca3fb4c0a19f348e Mon Sep 17 00:00:00 2001 From: wh1te909 Date: Wed, 25 Nov 2020 02:46:50 +0000 Subject: [PATCH] remove task that's no longer applicable due to recent db changes --- api/tacticalrmm/core/tasks.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/api/tacticalrmm/core/tasks.py b/api/tacticalrmm/core/tasks.py index 54f03e16..960793c0 100644 --- a/api/tacticalrmm/core/tasks.py +++ b/api/tacticalrmm/core/tasks.py @@ -4,8 +4,6 @@ from loguru import logger from django.conf import settings from django.utils import timezone as djangotime from tacticalrmm.celery import app -from accounts.models import User -from agents.models import Agent from autotasks.models import AutomatedTask from autotasks.tasks import delete_win_task_schedule @@ -14,15 +12,6 @@ logger.configure(**settings.LOG_CONFIG) @app.task def core_maintenance_tasks(): - # cleanup any leftover agent user accounts - agents = Agent.objects.values_list("agent_id", flat=True) - users = User.objects.exclude(username__in=agents).filter(last_login=None) - if users: - users.delete() - logger.info( - "Removed leftover agent user accounts:", str([i.username for i in users]) - ) - # cleanup expired runonce tasks tasks = AutomatedTask.objects.filter( task_type="runonce",