Set correct order of filtering teams on migration function

This commit is contained in:
Andrey Antukh 2024-01-25 09:49:40 +01:00
parent 0d5c1811cf
commit e6766bac8f

View file

@ -356,13 +356,13 @@
(run! process-team (run! process-team
(->> (get-teams conn query pred) (->> (get-teams conn query pred)
(take max-items)
(filter (fn [team-id] (filter (fn [team-id]
(if (int? partitions) (if (int? partitions)
(= current-partition (-> (uuid/hash-int team-id) (= current-partition (-> (uuid/hash-int team-id)
(mod partitions) (mod partitions)
(inc))) (inc)))
true))))) true)))
(take max-items)))
;; Close and await tasks ;; Close and await tasks
(pu/close! executor))) (pu/close! executor)))