Spaces:
Paused
Paused
Commit ·
4f96034
1
Parent(s): 4bafff4
11th
Browse files- celery_app.py +4 -4
celery_app.py
CHANGED
|
@@ -34,10 +34,10 @@ REDIS_PASSWORD = settings.REDIS_PASSWORD
|
|
| 34 |
|
| 35 |
if REDIS_PASSWORD:
|
| 36 |
BROKER_URL = f"rediss://:{REDIS_PASSWORD}@{REDIS_HOST}:{REDIS_PORT}/0?ssl_cert_reqs=CERT_NONE"
|
| 37 |
-
BACKEND_URL = f"rediss://:{REDIS_PASSWORD}@{REDIS_HOST}:{REDIS_PORT}/
|
| 38 |
else:
|
| 39 |
BROKER_URL = f"redis://{REDIS_HOST}:{REDIS_PORT}/0"
|
| 40 |
-
BACKEND_URL = f"redis://{REDIS_HOST}:{REDIS_PORT}/
|
| 41 |
|
| 42 |
celery_app = Celery(
|
| 43 |
"assistant_worker",
|
|
@@ -68,10 +68,10 @@ def clear_redis_backend():
|
|
| 68 |
password=REDIS_PASSWORD,
|
| 69 |
ssl=True,
|
| 70 |
ssl_cert_reqs=None,
|
| 71 |
-
db=
|
| 72 |
)
|
| 73 |
else:
|
| 74 |
-
r = redis.Redis(host=REDIS_HOST, port=REDIS_PORT, db=
|
| 75 |
r.flushdb()
|
| 76 |
print("Redis result backend cleared!")
|
| 77 |
|
|
|
|
| 34 |
|
| 35 |
if REDIS_PASSWORD:
|
| 36 |
BROKER_URL = f"rediss://:{REDIS_PASSWORD}@{REDIS_HOST}:{REDIS_PORT}/0?ssl_cert_reqs=CERT_NONE"
|
| 37 |
+
BACKEND_URL = f"rediss://:{REDIS_PASSWORD}@{REDIS_HOST}:{REDIS_PORT}/0?ssl_cert_reqs=CERT_NONE"
|
| 38 |
else:
|
| 39 |
BROKER_URL = f"redis://{REDIS_HOST}:{REDIS_PORT}/0"
|
| 40 |
+
BACKEND_URL = f"redis://{REDIS_HOST}:{REDIS_PORT}/0"
|
| 41 |
|
| 42 |
celery_app = Celery(
|
| 43 |
"assistant_worker",
|
|
|
|
| 68 |
password=REDIS_PASSWORD,
|
| 69 |
ssl=True,
|
| 70 |
ssl_cert_reqs=None,
|
| 71 |
+
db=0,
|
| 72 |
)
|
| 73 |
else:
|
| 74 |
+
r = redis.Redis(host=REDIS_HOST, port=REDIS_PORT, db=0)
|
| 75 |
r.flushdb()
|
| 76 |
print("Redis result backend cleared!")
|
| 77 |
|