fix: make periodically-push-tasks consistent with state/get-git-auto-push?

This commit is contained in:
Yukun Guo
2020-11-30 17:12:42 +08:00
committed by Tienson Qin
parent e750eca112
commit de6f9fff47

View File

@@ -493,12 +493,8 @@
(defn periodically-push-tasks
[repo-url]
(spec/validate :repos/url repo-url)
(let [push (fn []
(when (not (false? (:git-auto-push (state/get-config repo-url))))
(push repo-url nil)))]
(js/setInterval push
(* (config/git-push-secs) 1000))))
(js/setInterval #(push-if-auto-enabled! repo-url)
(* (config/git-push-secs) 1000)))
(defn periodically-pull-and-push
[repo-url {:keys [pull-now?]