]> Git — Sourcephile - sourcephile-nix.git/blob - nixpkgs/overlays/sourcehut/listssrht.patch
losurdo: fallback to old screen
[sourcephile-nix.git] / nixpkgs / overlays / sourcehut / listssrht.patch
1 From 0a2983ec01e19b277ec49759ffabe25feb5b44e7 Mon Sep 17 00:00:00 2001
2 From: Julien Moutinho <julm@sourcephile.fr>
3 Date: Fri, 20 Aug 2021 14:26:55 +0200
4 Subject: [PATCH] process: change Celery's queue to share the Redis database
5
6 ---
7 listssrht/process.py | 1 +
8 listssrht/webhooks.py | 2 +-
9 2 files changed, 2 insertions(+), 1 deletion(-)
10
11 diff --git a/listssrht/process.py b/listssrht/process.py
12 index 1017f0b..f720a6e 100644
13 --- a/listssrht/process.py
14 +++ b/listssrht/process.py
15 @@ -30,6 +30,7 @@ from srht.email import mail_exception
16 from urllib.parse import quote
17
18 dispatch = Celery("lists.sr.ht", broker=cfg("lists.sr.ht", "redis"))
19 +dispatch.conf.task_default_queue = 'listssrht'
20
21 smtp_host = cfg("mail", "smtp-host", default=None)
22 smtp_port = cfgi("mail", "smtp-port", default=None)
23 diff --git a/listssrht/webhooks.py b/listssrht/webhooks.py
24 index 61997c3..dc22518 100644
25 --- a/listssrht/webhooks.py
26 +++ b/listssrht/webhooks.py
27 @@ -9,7 +9,7 @@ if not hasattr(db, "session"):
28 from srht.webhook import Event
29 from srht.webhook.celery import CeleryWebhook, make_worker
30
31 -worker = make_worker(broker=cfg("lists.sr.ht", "webhooks"))
32 +worker = make_worker("listssrht", broker=cfg("lists.sr.ht", "webhooks"))
33
34 class ListWebhook(CeleryWebhook):
35 events = [
36 --
37 2.32.0
38