From 73223b6c8791e9391c0b40833d508d8c7769f52d Mon Sep 17 00:00:00 2001 From: Sumit Kumar Date: Wed, 10 May 2023 03:41:09 +0700 Subject: [PATCH] Fix db backup (#421) --- core/{task.py => tasks.py} | 0 mysterio/celery.py | 13 +------------ 2 files changed, 1 insertion(+), 12 deletions(-) rename core/{task.py => tasks.py} (100%) diff --git a/core/task.py b/core/tasks.py similarity index 100% rename from core/task.py rename to core/tasks.py diff --git a/mysterio/celery.py b/mysterio/celery.py index 7313f732..d55befb6 100644 --- a/mysterio/celery.py +++ b/mysterio/celery.py @@ -2,7 +2,7 @@ from logging.config import dictConfig from django.conf import settings from celery import Celery -from celery.signals import worker_ready, setup_logging +from celery.signals import setup_logging os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mysterio.settings.local") @@ -20,14 +20,3 @@ def config_loggers(*args, **kwags): # pylint: disable=unused-argument app.autodiscover_tasks() - - -@worker_ready.connect -def at_start(sender, **kwargs): - """ - Run periodic tasks at start. - """ - with sender.app.connection() as conn: - sender.app.send_task("chat.tasks.trending_rooms", connection=conn) - sender.app.send_task("chat.tasks.group_rooms", connection=conn) - sender.app.send_task("customauth.tasks.flush_tokens", connection=conn)