(create-dispatch {:keys [options] :as m})creates a queue executor
;; DELAY, MAX-BATCH 300 (test-scaffold +test-config+) => (contains [300])
;; DELAY, MAX-BATCH 500 (test-scaffold (-> +test-config+ (assoc-in [:options :queue :max-batch] 500))) => (contains [500])
;; NO DELAY, MAX-BATCH 300 (test-scaffold (-> +test-config+ (update-in [:options :queue] dissoc :delay))) ;; [29 300 300 300 71] => #(-> % count (>= 4))
;; NO DELAY, MAX-BATCH 500 (test-scaffold (-> +test-config+ (update-in [:options :queue] dissoc :delay) (assoc-in [:options :queue :max-batch] 500))) ;; [43 500 457] => #(-> % count (<= 3))
creates a queue executor
;; DELAY, MAX-BATCH 300
(test-scaffold +test-config+)
=> (contains [300])
;; DELAY, MAX-BATCH 500
(test-scaffold (-> +test-config+
(assoc-in [:options :queue :max-batch] 500)))
=> (contains [500])
;; NO DELAY, MAX-BATCH 300
(test-scaffold (-> +test-config+
(update-in [:options :queue] dissoc :delay)))
;; [29 300 300 300 71]
=> #(-> % count (>= 4))
;; NO DELAY, MAX-BATCH 500
(test-scaffold (-> +test-config+
(update-in [:options :queue] dissoc :delay)
(assoc-in [:options :queue :max-batch] 500)))
;; [43 500 457]
=> #(-> % count (<= 3))(handler-fn {:keys [handler runtime options] :as dispatch})creates a queue handler function
creates a queue handler function
(start-dispatch {:keys [runtime] :as dispatch})starts a queue executor
(-> (create-dispatch +test-config+) (start-dispatch) (h/stop))
starts a queue executor
(-> (create-dispatch +test-config+)
(start-dispatch)
(h/stop))(submit-dispatch {:keys [handler runtime options] :as dispatch} entry)submits to a queue executor
submits to a queue executor
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |