Liking cljdoc? Tell your friends :D

agentti.lifecycle


add-worker!clj

(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.
sourceraw docstring

stop-all-workers!clj

(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}.
sourceraw docstring

stop-worker!clj

(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.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close