Skip to content

Commit

Permalink
Remove warnings on startup
Browse files Browse the repository at this point in the history
  • Loading branch information
Augustin-FL committed Dec 28, 2024
1 parent 3de99e3 commit ea231e2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
2 changes: 2 additions & 0 deletions fir/config/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
18 changes: 9 additions & 9 deletions fir_celery/celeryconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit ea231e2

Please sign in to comment.