Improve update-file webhook batching

make it per user
This commit is contained in:
Andrey Antukh 2023-01-06 16:27:23 +01:00
parent 97a884018f
commit b235d3f0f2
4 changed files with 28 additions and 8 deletions

View file

@ -8,6 +8,7 @@
"A mattermost integration for error reporting."
(:require
[app.common.data :as d]
[app.common.data.macros :as dm]
[app.common.logging :as l]
[app.common.transit :as t]
[app.common.uri :as uri]
@ -21,6 +22,15 @@
[cuerdas.core :as str]
[integrant.core :as ig]))
;; --- HELPERS
(defn key-fn
[k & keys]
(fn [params]
(reduce #(dm/str %1 ":" (get params %2))
(dm/str (get params k))
keys)))
;; --- PROC
(defn- lookup-webhooks-by-team