about summary refs log tree commit diff
path: root/pkgs/applications/version-management/sourcehut/patches/redis-socket/meta/0001-Revert-Add-webhook-queue-monitoring.patch
blob: 9ec37670b0600f685b7107bdf0cfe65e679e3f3b (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 d88bee195797c6c294320617ff14798da94cd0f3 Mon Sep 17 00:00:00 2001
From: Julien Moutinho <julm+srht@sourcephile.fr>
Date: Thu, 16 Dec 2021 04:52:08 +0100
Subject: [PATCH meta.sr.ht] Revert "Add webhook queue monitoring"

This reverts commit 9931df3c23094af5179df9ef019ca732b8125dac.

This 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
---
 metasrht/app.py      | 3 ---
 metasrht/webhooks.py | 5 +----
 2 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/metasrht/app.py b/metasrht/app.py
index b190875..89c59bc 100644
--- a/metasrht/app.py
+++ b/metasrht/app.py
@@ -49,9 +49,6 @@ class MetaApp(SrhtFlask):
             from metasrht.blueprints.billing import billing
             self.register_blueprint(billing)
 
-        from metasrht.webhooks import webhook_metrics_collector
-        self.metrics_registry.register(webhook_metrics_collector)
-
         @self.context_processor
         def inject():
             return {
diff --git a/metasrht/webhooks.py b/metasrht/webhooks.py
index 3e1149e..3f0ba01 100644
--- a/metasrht/webhooks.py
+++ b/metasrht/webhooks.py
@@ -7,11 +7,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("meta.sr.ht", "webhooks", "redis://")
-worker = make_worker(broker=webhook_broker)
-webhook_metrics_collector = RedisQueueCollector(webhook_broker, "srht_webhooks", "Webhook queue length")
+worker = make_worker(broker=cfg("meta.sr.ht", "webhooks", "redis://"))
 
 class UserWebhook(CeleryWebhook):
     events = [
-- 
2.34.0