(add-worker! {:keys [worker-name interval-ms timeout-ms body-fn jitter-frac
jitter-ms]
:as config})Register and launch a periodic worker using chime.
Required keys: :worker-name (string/keyword, unique) :body-fn (0-arg fn) :timeout-ms (ms) :interval-ms (ms; periodic cadence)
No-op if a worker with same name exists.
Returns nil.
Register and launch a periodic worker using chime. Required keys: :worker-name (string/keyword, unique) :body-fn (0-arg fn) :timeout-ms (ms) :interval-ms (ms; periodic cadence) No-op if a worker with same name exists. Returns nil.
(stop-all-workers!)(stop-all-workers! force?)Stops all workers. With force? truthy, interrupts in-flight tasks.
Returns a map of {worker-name -> true|nil}.
Stops all workers. With `force?` truthy, interrupts in-flight tasks.
Returns a map of {worker-name -> true|nil}.(stop-worker! name)(stop-worker! name force?)Stops the named worker. If force? is truthy, interrupts in-flight task(s).
Returns true if a worker was found (and shutdown initiated), else nil.
Stops the named worker. If `force?` is truthy, interrupts in-flight task(s). Returns true if a worker was found (and shutdown initiated), else nil.
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 |