Liking cljdoc? Tell your friends :D

std.dispatch.queue


*max-batch*clj


+defaults+clj


create-dispatchclj

(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))
raw docstring

create-dispatch-typecheckclj


handler-fnclj

(handler-fn {:keys [handler runtime options] :as dispatch})

creates a queue handler function

creates a queue handler function
raw docstring

start-dispatchclj

(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))
raw docstring

submit-dispatchclj

(submit-dispatch {:keys [handler runtime options] :as dispatch} entry)

submits to a queue executor

submits to a queue executor
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close