Liking cljdoc? Tell your friends :D

ablauf.job.sql

A minimalist job queue worker for SQL. This assumes multiple worker off of a main job queue. In the following code, each worker is assumed to be able to process both actions and workflow evaluation. The processing is based off of two tables: task and workflow_run. workflow_run holds information about a full workflow run and its current status, while task is used for both calls to job/restart and action dispatches.

A minimalist job queue worker for SQL. This assumes
multiple worker off of a main job queue. In the following
code, each worker is assumed to be able to process both
actions and workflow evaluation. The processing is based off
of two tables: `task` and `workflow_run`. `workflow_run` holds
information about a full workflow run and its current status,
while `task` is used for both calls to `job/restart` and action
dispatches.
raw docstring

deserializeclj

source

serializeclj

source

submitclj

(submit
  db
  jobstore
  job
  {:keys [context type system uuid owner metadata]
   :or
     {context {} metadata {} owner "unknown" type "unknown" system "unknown"}})

Create a new job to be processed. Only registers the job entry, no processing will be performed unless at least one separate thread concurrently runs worker.

Create a new job to be processed. Only registers the job entry, no
processing will be performed unless at least one separate thread
concurrently runs `worker`.
sourceraw docstring

workerclj

(worker db jobstore {:keys [action-fn]} wait-ms wait-allowance stop-fn)

Until stop-fn returns true, process items until the queue is exhausted, then wait for a random amount of time (between wait-ms and wait-ms + wait-allowance).

As many worker threads as necessary can be started on a single host.

Until `stop-fn` returns true, process items until the queue is
exhausted, then wait for a random amount of time (between `wait-ms`
and `wait-ms` + `wait-allowance`).

 As many worker threads as necessary can be started on a single
host.
sourceraw docstring

workflow-by-uuidclj

(workflow-by-uuid tx uuid)

Fetch workflow from the database by UUID and restore stored job data to a usable form.

Fetch workflow from the database by UUID and restore stored job data to
a usable form.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close