(add-to-batch engine it)Adds item to batch, adds batch to queue if max-items was reached.
Adds item to batch, adds batch to queue if max-items was reached.
(finished? engine)(force-enqueue engine)Forces a batch to queue if queue is empty and the runner state allows for more tasks
Forces a batch to queue if queue is empty and the runner state allows for more tasks
(has-capacity? engine)(init-engine engine get-pages-fn)(mark-invalid-state s)If state is invalid, mark it with an exception
If state is invalid, mark it with an exception
(merge-ps result paging-state)Updates an existing pagestate map with results. It will specially handle :pages, :items, :page-cursor, the rest of it is merged into paging-state as is.
Updates an existing pagestate map with results. It will specially handle :pages, :items, :page-cursor, the rest of it is merged into paging-state as is.
(paging-state? s)Returns true if the map looks like a paging state with cursor.
Returns true if the map looks like a paging state with cursor.
(run!! {:keys [get-pages-fn items-in-runner items-in-process]} paging-states)(run-from-queue! {:keys [async-fn ch-result] :as engine})Enqueues a batch with the runner if there is one in the queue and the runner has capacity. Returns new engine state.
Enqueues a batch with the runner if there is one in the queue and the runner has capacity. Returns new engine state.
(swap-xf! atom* f)A transducer that runs f on atom* for each item seen.
A transducer that runs f on atom* for each item seen.
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 |