summary refs log tree commit diff
path: root/pkgs/applications/version-management/sourcehut/patches/redis-socket/lists/0001-Revert-Add-webhook-queue-monitoring.patch
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/version-management/sourcehut/patches/redis-socket/lists/0001-Revert-Add-webhook-queue-monitoring.patch')
-rw-r--r--pkgs/applications/version-management/sourcehut/patches/redis-socket/lists/0001-Revert-Add-webhook-queue-monitoring.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/pkgs/applications/version-management/sourcehut/patches/redis-socket/lists/0001-Revert-Add-webhook-queue-monitoring.patch b/pkgs/applications/version-management/sourcehut/patches/redis-socket/lists/0001-Revert-Add-webhook-queue-monitoring.patch
new file mode 100644
index 00000000000..872d285b9bb
--- /dev/null
+++ b/pkgs/applications/version-management/sourcehut/patches/redis-socket/lists/0001-Revert-Add-webhook-queue-monitoring.patch
@@ -0,0 +1,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
+