Skip to content

Commit

Permalink
Fix db backup (#421)
Browse files Browse the repository at this point in the history
  • Loading branch information
ravisumit33 authored May 9, 2023
1 parent 440d9b7 commit 73223b6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
File renamed without changes.
13 changes: 1 addition & 12 deletions mysterio/celery.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand All @@ -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)

0 comments on commit 73223b6

Please sign in to comment.