mirror of
https://github.com/mediacms-io/mediacms.git
synced 2025-08-20 13:16:17 +00:00
MediaCMS backend, initial commit
This commit is contained in:
16
cms/celery.py
Normal file
16
cms/celery.py
Normal file
@ -0,0 +1,16 @@
|
||||
from __future__ import absolute_import
|
||||
import os
|
||||
from celery import Celery
|
||||
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cms.settings")
|
||||
app = Celery("cms")
|
||||
|
||||
app.config_from_object("django.conf:settings")
|
||||
app.autodiscover_tasks()
|
||||
|
||||
app.conf.beat_schedule = app.conf.CELERY_BEAT_SCHEDULE
|
||||
app.conf.broker_transport_options = {"visibility_timeout": 60 * 60 * 24} # 1 day
|
||||
# http://docs.celeryproject.org/en/latest/getting-started/brokers/redis.html#redis-caveats
|
||||
|
||||
|
||||
app.conf.worker_prefetch_multiplier = 1
|
Reference in New Issue
Block a user