diff --git a/fir/config/base.py b/fir/config/base.py index 7bb8c7f5..4bc010a1 100755 --- a/fir/config/base.py +++ b/fir/config/base.py @@ -213,3 +213,5 @@ # HTTP_X_API == "X-Api" in HTTP headers. 'TOKEN_AUTHENTICATION_META': 'HTTP_X_API', } + +DEFAULT_AUTO_FIELD = "django.db.models.AutoField" diff --git a/fir_celery/celeryconf.py b/fir_celery/celeryconf.py index 5e0e63c0..737c2212 100644 --- a/fir_celery/celeryconf.py +++ b/fir_celery/celeryconf.py @@ -3,21 +3,21 @@ import os from celery import Celery -os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'fir.settings') +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "fir.settings") from django.conf import settings celery_app = Celery( - 'celeryconf', - broker='redis://%s:%d/%d' % (settings.REDIS_HOST, settings.REDIS_PORT, - settings.REDIS_DB), - backend='redis://%s:%d/%d' % (settings.REDIS_HOST, settings.REDIS_PORT, - settings.REDIS_DB) - ) + "celeryconf", + broker="redis://%s:%d/%d" + % (settings.REDIS_HOST, settings.REDIS_PORT, settings.REDIS_DB), + backend="redis://%s:%d/%d" + % (settings.REDIS_HOST, settings.REDIS_PORT, settings.REDIS_DB), + broker_connection_retry_on_startup=True, +) celery_app.autodiscover_tasks(lambda: settings.INSTALLED_APPS) - -if __name__ == '__main__': +if __name__ == "__main__": celery_app.start()