Use celery_once to prevent repeat task queueing.

Prevent group updates from being queued multiple times per user.

Default graceful to prevent raising exceptions.
This commit is contained in:
Adarnof
2018-03-19 20:39:27 -04:00
parent 20236cab8a
commit 73e6f576f4
12 changed files with 38 additions and 15 deletions

View File

@@ -7,6 +7,13 @@ os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'settings')
from django.conf import settings # noqa
app = Celery('devauth')
app.conf.ONCE = {
'backend': 'celery_once.backends.Redis',
'settings': {
'url': 'redis://localhost:6379/0',
'default_timeout': 60 * 60
}
}
# Using a string here means the worker don't have to serialize
# the configuration object to child processes.