From 0a2983ec01e19b277ec49759ffabe25feb5b44e7 Mon Sep 17 00:00:00 2001
From: Julien Moutinho <julm@sourcephile.fr>
Date: Fri, 20 Aug 2021 14:26:55 +0200
Subject: [PATCH] process: change Celery's queue to share the Redis database

---
 listssrht/process.py  | 1 +
 listssrht/webhooks.py | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/listssrht/process.py b/listssrht/process.py
index 1017f0b..f720a6e 100644
--- a/listssrht/process.py
+++ b/listssrht/process.py
@@ -30,6 +30,7 @@ from srht.email import mail_exception
 from urllib.parse import quote
 
 dispatch = Celery("lists.sr.ht", broker=cfg("lists.sr.ht", "redis"))
+dispatch.conf.task_default_queue = 'listssrht'
 
 smtp_host = cfg("mail", "smtp-host", default=None)
 smtp_port = cfgi("mail", "smtp-port", default=None)
diff --git a/listssrht/webhooks.py b/listssrht/webhooks.py
index 61997c3..dc22518 100644
--- a/listssrht/webhooks.py
+++ b/listssrht/webhooks.py
@@ -9,7 +9,7 @@ if not hasattr(db, "session"):
 from srht.webhook import Event
 from srht.webhook.celery import CeleryWebhook, make_worker
 
-worker = make_worker(broker=cfg("lists.sr.ht", "webhooks"))
+worker = make_worker("listssrht", broker=cfg("lists.sr.ht", "webhooks"))
 
 class ListWebhook(CeleryWebhook):
     events = [
-- 
2.32.0