From ea231e2eb92e42178c71a4e14fbe986852e70d07 Mon Sep 17 00:00:00 2001
From: Augustin-FL <Augustin-FL@users.noreply.github.com>
Date: Sat, 28 Dec 2024 19:45:12 +0100
Subject: [PATCH] Remove warnings on startup

---
 fir/config/base.py       |  2 ++
 fir_celery/celeryconf.py | 18 +++++++++---------
 2 files changed, 11 insertions(+), 9 deletions(-)

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()