Merge remote-tracking branch 'origin/main' into develop

This commit is contained in:
Andrey Antukh 2022-03-01 15:10:33 +01:00
commit 03cb738e55
14 changed files with 141 additions and 18 deletions

View file

@ -50,7 +50,7 @@
(assoc :host (cf/get :host))
(assoc :public-uri (cf/get :public-uri))
(assoc :version (:full cf/version))
(assoc :id (uuid/next))))
(update :id #(or % (uuid/next)))))
(defn handle-event
[{:keys [executor] :as cfg} event]

View file

@ -350,7 +350,6 @@
:opt-un [::lang ::theme]))
(sv/defmethod ::update-profile
{::async/dispatch :default}
[{:keys [pool] :as cfg} params]
(db/with-atomic [conn pool]
(let [profile (update-profile conn params)]

View file

@ -106,7 +106,7 @@
on-message
(fn [_ message]
(mtx/run! metrics {:id :websocket-messages-total :labels ["send"] :inc 1})
(mtx/run! metrics {:id :websocket-messages-total :labels ["recv"] :inc 1})
(try
(let [message (t/decode-str message)]
(a/offer! input-ch message))

View file

@ -79,11 +79,11 @@
(letfn [(log-stats [scheduler state]
(doseq [[key ^ForkJoinPool executor] executors]
(let [labels (into-array String [(name key)])
active (.getActiveThreadCount executor)
running (.getRunningThreadCount executor)
queued (.getQueuedSubmissionCount executor)
active (.getPoolSize executor)
steals (.getStealCount executor)
steals-increment (- steals (or (get-in @state [key :steals]) 9))
steals-increment (- steals (or (get-in @state [key :steals]) 0))
steals-increment (if (neg? steals-increment) 0 steals-increment)]
(mtx/run! metrics {:id :executors-active-threads :labels labels :val active})