(add-dependents m group dependents)
add dependents to a given lookup
(add-dependents {:a #{:d}} :a #{:b :c}) => {:a #{:c :b :d}}
add dependents to a given lookup (add-dependents {:a #{:d}} :a #{:b :c}) => {:a #{:c :b :d}}
(clear-board {:keys [runtime] :as dispatch} group ticket)
clears the board
(def -ex- (doto (-> (create-dispatch +test-config+)) (submit-board {:id "a"} "t0") (poll-board "a")))
(clear-board -ex- "a" "t0") => {:group "a", :dependent #{"a"}}
clears the board (def -ex- (doto (-> (create-dispatch +test-config+)) (submit-board {:id "a"} "t0") (poll-board "a"))) (clear-board -ex- "a" "t0") => {:group "a", :dependent #{"a"}}
(create-dispatch {:keys [hooks options] :as m})
creates the board executor
creates the board executor
(new-board {:keys [limit]})
creates a new board
(new-board {})
creates a new board (new-board {})
(poll-board {:keys [runtime options] :as dispatch} group)
polls the board for job entry
(def -ex- (doto (create-dispatch +test-config+) (submit-board {:id "a"} "t0")))
(poll-board -ex- "a") => (contains {:groups ["a"], :entry {:id "a"}, :ticket "t0"})
polls the board for job entry (def -ex- (doto (create-dispatch +test-config+) (submit-board {:id "a"} "t0"))) (poll-board -ex- "a") => (contains {:groups ["a"], :entry {:id "a"}, :ticket "t0"})
(poll-dispatch {:keys [handler runtime] :as dispatch} groups)
polls the executor for more work
polls the executor for more work
(start-dispatch dispatch)
starts the board executor
(test-scaffold +scaffold-config+ [[:a :b :c] [:a :b] [:c] [:b :d] [:b :c :d] [:c] [:a] [:b :c] [:c] [:d] [:a]]) => (contains [{:id 0, :groups [:a :b :c]} {:id 2, :groups [:c]} {:id 1, :groups [:a :b]} {:id 3, :groups [:b :d]} {:id 6, :groups [:a]} {:id 10, :groups [:a]} {:id 4, :groups [:b :c :d]} {:id 5, :groups [:c]} {:id 9, :groups [:d]} {:id 7, :groups [:b :c]} {:id 8, :groups [:c]}] :in-any-order)
starts the board executor (test-scaffold +scaffold-config+ [[:a :b :c] [:a :b] [:c] [:b :d] [:b :c :d] [:c] [:a] [:b :c] [:c] [:d] [:a]]) => (contains [{:id 0, :groups [:a :b :c]} {:id 2, :groups [:c]} {:id 1, :groups [:a :b]} {:id 3, :groups [:b :d]} {:id 6, :groups [:a]} {:id 10, :groups [:a]} {:id 4, :groups [:b :c :d]} {:id 5, :groups [:c]} {:id 9, :groups [:d]} {:id 7, :groups [:b :c]} {:id 8, :groups [:c]}] :in-any-order)
(stop-dispatch dispatch)
stops the board executor
stops the board executor
(submit-board dispatch entry)
(submit-board {:keys [runtime options] :as dispatch} entry ticket)
submits an entry to a board
(def -ex- (create-dispatch +test-config+))
(-> -ex- (submit-board {:id "a"} "t0")) => (contains ["t0" ["a"] h/future?])
submits an entry to a board (def -ex- (create-dispatch +test-config+)) (-> -ex- (submit-board {:id "a"} "t0")) => (contains ["t0" ["a"] h/future?])
(submit-dispatch dispatch entry)
submits to the board executor
submits to the board executor
(submit-ticket m groups ticket)
adds ticket to the board
(submit-ticket {} ["a" "b"] "t1") => {"a" ["t1"], "b" ["t1"]}
adds ticket to the board (submit-ticket {} ["a" "b"] "t1") => {"a" ["t1"], "b" ["t1"]}
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close