blob: 872d285b9bb0785a46a9e9c05bd5aaf083df0049 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
From 730e090f31b150d42be4b4722751f8e4610835b0 Mon Sep 17 00:00:00 2001
From: Julien Moutinho <julm+srht@sourcephile.fr>
Date: Sat, 12 Feb 2022 00:38:12 +0100
Subject: [PATCH lists.sr.ht] Revert "Add webhook queue monitoring"
This reverts commit e74e344808e8d523a9786cefcbf64c9a247d7a0e.
Which has broken Unix socket support for Redis.
See https://lists.sr.ht/~sircmpwn/sr.ht-dev/%3C20211208082636.65665-1-me%40ignaskiela.eu%3E#%3C20211216033723.wefibfulfjhqnhem@sourcephile.fr%3E
---
listssrht/app.py | 3 ---
listssrht/webhooks.py | 5 +----
2 files changed, 1 insertion(+), 7 deletions(-)
diff --git a/listssrht/app.py b/listssrht/app.py
index aec59f3..83a355d 100644
--- a/listssrht/app.py
+++ b/listssrht/app.py
@@ -29,9 +29,6 @@ class ListsApp(SrhtFlask):
self.register_blueprint(user)
self.register_blueprint(gql_blueprint)
- from listssrht.webhooks import webhook_metrics_collector
- self.metrics_registry.register(webhook_metrics_collector)
-
@self.context_processor
def inject():
from listssrht.types import ListAccess
diff --git a/listssrht/webhooks.py b/listssrht/webhooks.py
index ae5b1cb..86421ba 100644
--- a/listssrht/webhooks.py
+++ b/listssrht/webhooks.py
@@ -8,11 +8,8 @@ if not hasattr(db, "session"):
db.init()
from srht.webhook import Event
from srht.webhook.celery import CeleryWebhook, make_worker
-from srht.metrics import RedisQueueCollector
-webhook_broker = cfg("lists.sr.ht", "webhooks")
-worker = make_worker(broker=webhook_broker)
-webhook_metrics_collector = RedisQueueCollector(webhook_broker, "srht_webhooks", "Webhook queue length")
+worker = make_worker(broker=cfg("lists.sr.ht", "webhooks"))
class ListWebhook(CeleryWebhook):
events = [
--
2.34.1
|