(immediate-task-seq qs q-name)Returns a finite lazy sequence of tasks for q-name which terminates once there are
no more tasks immediately available.
Returns a finite lazy sequence of tasks for `q-name` which terminates once there are no more tasks immediately available.
(interval-task-seq qs q-name interval)Returns a lazy sequence of tasks that can be consumed in interval milliseconds. This will
terminate after that time has elapsed, even if there are still tasks immediately available.
Returns a lazy sequence of tasks that can be consumed in `interval` milliseconds. This will terminate after that time has elapsed, even if there are still tasks immediately available.
(delete! _)DEPRECATED: Deletes all files associated with all queues. Dangerous!
DEPRECATED: Deletes all files associated with all queues. Dangerous!
(delete-all! _)Deletes all queues, including all associated files.
Deletes all queues, including all associated files.
(delete-queue! _ q-name)Deletes the specific queue, including all associated files.
Deletes the specific queue, including all associated files.
(fsync _)Forces an fsync on all modified files.
Forces an fsync on all modified files.
(put! _ q-name task-descriptor)(put! _ q-name task-descriptor timeout)A blocking enqueue to q-name. If timeout is specified, returns false if unable to
enqueue within timeout milliseconds, true otherwise.
A blocking enqueue to `q-name`. If `timeout` is specified, returns `false` if unable to enqueue within `timeout` milliseconds, `true` otherwise.
(stats _)Returns a map of queue names onto information about the immediate state of the queue.
Returns a map of queue names onto information about the immediate state of the queue.
(take! _ q-name)(take! _ q-name timeout timeout-val)A blocking dequeue from q-name. If timeout is specified, returns timeout-val if
no task is available within timeout milliseconds.
A blocking dequeue from `q-name`. If `timeout` is specified, returns `timeout-val` if no task is available within `timeout` milliseconds.
(queues directory)(queues directory
{:keys [max-queue-size complete? slab-size fsync-put? fsync-take?
fsync-threshold fsync-interval]
:or {max-queue-size Integer/MAX_VALUE
complete? nil
slab-size (* 64 1024 1024)
fsync-put? true
fsync-take? false}})Creates a point of interaction for queues, backed by disk storage in directory.
The following options can be specified:
max-queue-size - the maximum number of elements that can be in the queue before `put!`
blocks. Defaults to `Integer/MAX_VALUE`.
complete? - a predicate that is run on pre-existing tasks to check if they were already
completed. If the tasks in the queue are non-idempotent, this must be
specified for correct behavior. Defaults to always returning false.
slab-size - The size, in bytes, of the backing files for the queue. Defaults to 16mb.
fsync-put? - if true, each `put!` will force an fsync. Defaults to true.
fsync-take? - if true, each `take!` will force an fsync. Defaults to false.
fsync-threshold - The maximum number of writes (puts, takes, retries, completes) that
can be performed before an fsync is performed.
fsync-interval - The maximum amount of time, in milliseconds, that can elapse before
an fsync is performed.
Creates a point of interaction for queues, backed by disk storage in `directory`.
The following options can be specified:
max-queue-size - the maximum number of elements that can be in the queue before `put!`
blocks. Defaults to `Integer/MAX_VALUE`.
complete? - a predicate that is run on pre-existing tasks to check if they were already
completed. If the tasks in the queue are non-idempotent, this must be
specified for correct behavior. Defaults to always returning false.
slab-size - The size, in bytes, of the backing files for the queue. Defaults to 16mb.
fsync-put? - if true, each `put!` will force an fsync. Defaults to true.
fsync-take? - if true, each `take!` will force an fsync. Defaults to false.
fsync-threshold - The maximum number of writes (puts, takes, retries, completes) that
can be performed before an fsync is performed.
fsync-interval - The maximum amount of time, in milliseconds, that can elapse before
an fsync is performed.(retry! task)Marks a task as available for retry.
Marks a task as available for retry.
(task-seq qs q-name)Returns an infinite lazy sequence of tasks for q-name.
Returns an infinite lazy sequence of tasks for `q-name`.
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 |