Methods for managing a Temporal worker instance
Methods for managing a Temporal worker instance
(start client queue-name)
(start client queue-name ctx)
Starts a worker processing loop.
Arguments:
client
: WorkflowClient instance returned from temporal.client.core/create-client
queue-name
: The name of the task-queue for this worker instance to listen on. Accepts a string or fully-qualified
keyword.ctx
: (optional) an opaque handle that is passed as the first argument of temporal.workflow/defworkflow
and temporal.activity/defactivity
. Useful for passing state such as database or network
connections. Not interpreted in any manner.(start ::my-queue {:some "context"})
Starts a worker processing loop. Arguments: - `client`: WorkflowClient instance returned from [[temporal.client.core/create-client]] - `queue-name`: The name of the task-queue for this worker instance to listen on. Accepts a string or fully-qualified keyword. - `ctx`: (optional) an opaque handle that is passed as the first argument of [[temporal.workflow/defworkflow]] and [[temporal.activity/defactivity]]. Useful for passing state such as database or network connections. Not interpreted in any manner. ```clojure (start ::my-queue {:some "context"}) ```
(stop {:keys [factory] :as instance})
Stops a running worker.
Arguments:
instance
: Result returned from original call to (start
)(let [instance (start ::my-queue)]
...
(stop instance))
Stops a running worker. Arguments: - `instance`: Result returned from original call to ([[start]]) ```clojure (let [instance (start ::my-queue)] ... (stop instance)) ```
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close