Out-of-process workflow enqueuing via DBOSClient. Stateless — the consumer
owns the client's lifecycle (.close on shutdown).
Out-of-process workflow enqueuing via `DBOSClient`. Stateless — the consumer owns the client's lifecycle (`.close` on shutdown).
(create-client {:keys [datasource database-url db-user db-password schema
serializer]})Build a DBOSClient wired with the transit serializer. Caller owns lifecycle
(.close on shutdown).
javax.sql.DataSource (e.g. a HikariCP pool), ORBuild a DBOSClient wired with the transit serializer. Caller owns lifecycle (`.close` on shutdown). - :datasource any `javax.sql.DataSource` (e.g. a HikariCP pool), OR - :database-url + :db-user + :db-password - :schema optional DBOS schema for the system tables - :serializer optional DBOSSerializer (defaults to the transit serializer)
(enqueue-workflow! client wf-key opts workflow-data)Enqueue a workflow for async execution by a DBOS worker on the target queue
(fire-and-forget). No client-side registry — a typo'd wf-key surfaces as a
durable NOT_FOUND at the worker. Returns a deref-able WorkflowHandle.
client a DBOSClient instance (ex. created with create-client)wf-key keyword the workflow is registered underid-or-opts a workflow-id string, an options map (see
dbos.core/->workflow-opts), or a pre-built
DBOSClient$EnqueueOptions. A queue is REQUIRED for the
string/map forms — set :workflow/queue (a name string or
Queue instance); a pre-built options object encodes its own
queue, so the check is skipped for itworkflow-data the single serializable workflow argumentThe workflow id is available inside the body via (dbos.core/workflow-id)
and on the returned handle — it is NOT injected into workflow-data.
(enqueue-workflow! client :my/wf {:workflow/id "wf-1" :workflow/queue "my-queue"} {:some "input"})
Returns a deref-able WorkflowHandle: @handle blocks for the result.
Enqueue a workflow for async execution by a DBOS worker on the target queue
(fire-and-forget). No client-side registry — a typo'd `wf-key` surfaces as a
durable NOT_FOUND at the worker. Returns a deref-able WorkflowHandle.
- `client` a DBOSClient instance (ex. created with `create-client`)
- `wf-key` keyword the workflow is registered under
- `id-or-opts` a workflow-id string, an options map (see
`dbos.core/->workflow-opts`), or a pre-built
DBOSClient$EnqueueOptions. A queue is REQUIRED for the
string/map forms — set :workflow/queue (a name string or
Queue instance); a pre-built options object encodes its own
queue, so the check is skipped for it
- `workflow-data` the single serializable workflow argument
The workflow id is available inside the body via `(dbos.core/workflow-id)`
and on the returned handle — it is NOT injected into `workflow-data`.
(enqueue-workflow! client :my/wf
{:workflow/id "wf-1" :workflow/queue "my-queue"}
{:some "input"})
Returns a deref-able `WorkflowHandle`: `@handle` blocks for the result.(retrieve-workflow client workflow-id)Deref-able handle to an existing workflow by workflow-id, via the client.
Deref-able handle to an existing workflow by `workflow-id`, via the client.
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 |