(allocate-task-id)
(await-result task)
(await-results task)
(await-task task)
(build-task-function code)
(build-task-function {repeat :repeat
sleep-millis :sleep
accumulate :accumulate-results
repeat-value :repeat
while-clause :while
until-clause :until
:as options}
original-code)
Create the source code for the function to be called for each task execution. Code generation is done based on the provided options - you only pay for the options selected.
Create the source code for the function to be called for each task execution. Code generation is done based on the provided options - you only pay for the options selected.
(clear)
(clear task)
Clears all currently runnig tasks
Clears all currently runnig tasks
(complete? task)
(elapsed-time-secs task)
(get-task task-or-id)
Returns the current task associated with the given ID.
If called with an old task instance, returns the latest task for the same ID
Returns the current task associated with the given ID. If called with an old task instance, returns the latest task for the same ID
(ps &
{:keys [filter fields tasks sort]
:or {fields task-summary-fields
filter (constantly true)
sort :id
tasks (vals (clojure.core/deref tasks))}})
Prints a table of tasks
Prints a table of tasks
(result task)
(run code)
(run options code)
(run code k1 v1 & more)
Create and run a new task.
Calls task with the relevant options.
Create and run a new task. Calls task with the relevant options.
(run-task task)
(running? task)
(stop task)
(stop-all)
(stopped? task)
(task code)
(task options code)
Creates a task containing the given code. Valid options are: :repeat (Default) If left nil of false, the task will only execute once If a numeric value is used, the task will repeat the given number of times. If any other true value is used, the task will repeat infinitely.
:result An initial result value for the task. :result will be set to the value produced by the task on each iteration.
:accumulate-results If set to true, all results will be saved in the vector :results in the task.
:timeout A number of milliseconds to run the task for. If the timeout is reached during execution of the task, it will be allowed to complete.
:sleep A number of milliseconds to sleep between successive executions of the task
:while Code that will be called before each iteration with the task as an argument. If it returns true, then the task will complete.
:until Code that will be evaluated after each iteration with the task as an argument. If it returns true then the task will complete.
Creates a task containing the given code. Valid options are: :repeat (Default) If left nil of false, the task will only execute once If a numeric value is used, the task will repeat the given number of times. If any other true value is used, the task will repeat infinitely. :result An initial result value for the task. :result will be set to the value produced by the task on each iteration. :accumulate-results If set to true, all results will be saved in the vector :results in the task. :timeout A number of milliseconds to run the task for. If the timeout is reached during execution of the task, it will be allowed to complete. :sleep A number of milliseconds to sleep between successive executions of the task :while Code that will be called before each iteration with the task as an argument. If it returns true, then the task will complete. :until Code that will be evaluated after each iteration with the task as an argument. If it returns true then the task will complete.
(task* options function)
Creates a task data structure representing the specified function as a task
Creates a task data structure representing the specified function as a task
(task-loop task)
(task-summary task & {:keys [fields] :or {fields task-summary-fields}})
(wrap-if condition form)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close