Liking cljdoc? Tell your friends :D

agentti.lifecycle


add-worker!clj

(add-worker! {:keys [worker-name body-fn schedule timeout-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) :schedule (a chime sequence of Instants/ZonedDateTimes)

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)
  :schedule     (a chime sequence of Instants/ZonedDateTimes)

No-op if a worker with same name exists.

Returns nil.
sourceraw docstring

stop-all-workers!clj

(stop-all-workers!)

Stops all workers. Returns a map of {worker-name -> true|nil}.

Stops all workers. Returns a map of {worker-name -> true|nil}.
sourceraw docstring

stop-worker!clj

(stop-worker! worker-name)

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