Liking cljdoc? Tell your friends :D

std.scheduler


*no-limit*clj


clearclj

(clear runner)
(clear runner id)

clears the program and past spawn information

clears the program and past spawn information
raw docstring

count-spawnclj

(count-spawn runner)
(count-spawn runner id)

counts all running spawns

counts all running spawns
raw docstring

create-programclj

(create-program program)

creates a runner program

(create-program {:type :constant :id :hello :interval 10})

creates a runner program

(create-program {:type :constant
                 :id :hello
                :interval 10})
raw docstring

earliest-spawnclj

(earliest-spawn runner)
(earliest-spawn runner id)

returns earliest created spawn

returns earliest created spawn
raw docstring

get-all-spawnclj

(get-all-spawn runner)
(get-all-spawn runner id)

returns all running spawns

returns all running spawns
raw docstring

get-programclj

(get-program runner)
(get-program runner id)

gets the program given runtime and program-id

(get-program |rt3| :test-program) => {}

gets the program given runtime and program-id

(get-program |rt3| :test-program)
=> {}
raw docstring

get-propsclj

(get-props {:keys [runtime] :as runner} program-id)
(get-props {:keys [runtime] :as runner} program-id spawn-id)

gets the current props map for the runner

gets the current props map for the runner
raw docstring

get-spawnclj

(get-spawn runner program-id spawn-id)

gets running spawn with id

gets running spawn with id
raw docstring

get-stateclj

(get-state runner)
(get-state runner id)

gets the global state for the program-id

(get-state |rt3| :test-program) => {}

gets the global state for the program-id

(get-state |rt3| :test-program)
=> {}
raw docstring

installclj

(install {:keys [runtime] :as runner} program)

installs a program

installs a program
raw docstring

installed?clj

(installed? {:keys [runtime] :as runner} program-id)

checks if program is installed

(test-scaffold (fn [runner _] (installed? runner :world))) => true

checks if program is installed

(test-scaffold
 (fn [runner _]
   (installed? runner :world)))
=> true
raw docstring

kill-all-spawnclj

(kill-all-spawn runner)
(kill-all-spawn runner id)

kills all the running tasks

(-> (doto |rt3| (kill-all :test-program)) (count-spawn :test-program)) => 0

kills all the running tasks

(-> (doto |rt3|
      (kill-all :test-program))
    (count-spawn :test-program))
=> 0
raw docstring

kill-spawnclj

(kill-spawn runner program-id spawn-id)

stops a spawn and all jobs

(kill-spawn |rt3| :test-program "s1") => spawn?

stops a spawn and all jobs

(kill-spawn |rt3| :test-program "s1")
=> spawn?
raw docstring

latestclj

(latest runner)
(latest runner id)

returns the latest active or past spawn

returns the latest active or past spawn
raw docstring

latest-spawnclj

(latest-spawn runner)
(latest-spawn runner id)

returns latest created spawn

returns latest created spawn
raw docstring

latest-stoppedclj

(latest-stopped runner)
(latest-stopped runner id)

returns the most recently stopped spawn

returns the most recently stopped spawn
raw docstring

list-spawnclj

(list-spawn runner)
(list-spawn runner id)

lists all running spawns

lists all running spawns
raw docstring

list-stoppedclj

(list-stopped runner)
(list-stopped runner id)

lists all stopped spawns

lists all stopped spawns
raw docstring

runnerclj

(runner)
(runner m)

creates and starts a runner

(-> (runner {:id "runner"}) (h/comp:kill))

creates and starts a runner

(-> (runner {:id "runner"})
    (h/comp:kill))
raw docstring

runner:createclj

(runner:create)
(runner:create m)

creates a runner

(runner:create {:id "runner"}) => runner?

creates a runner

(runner:create {:id "runner"})
=> runner?
raw docstring

runner:healthclj

(runner:health runner)

returns health of runner

(runner:health |run|) => {:status :ok}

returns health of runner

(runner:health |run|)
=> {:status :ok}
raw docstring

runner:infoclj

(runner:info {:keys [runtime] :as runner})

returns runner info

(h/with:component [runner (runner:create {})] (runner:info runner)) => {:executors {:core {:threads 0, :active 0, :queued 0, :terminated false}, :scheduler {:threads 0, :active 0, :queued 0, :terminated false}}, :programs {}}

returns runner info

(h/with:component [runner (runner:create {})]
                  (runner:info runner))
=> {:executors {:core {:threads 0, :active 0, :queued 0, :terminated false},
                :scheduler {:threads 0, :active 0, :queued 0, :terminated false}},
    :programs {}}
raw docstring

runner:killclj

(runner:kill {:keys [runtime] :as runner})

kills the runner

kills the runner
raw docstring

runner:startclj

(runner:start {:keys [runtime] :as runner})

starts up the runner

(-> (runner:start |runner|) (runner:info)) => {:executors {:core {:threads 0, :active 0, :queued 0, :terminated false}, :scheduler {:threads 0, :active 0, :queued 0, :terminated false}}, :programs {}}

starts up the runner

(-> (runner:start |runner|)
    (runner:info))
=>  {:executors {:core {:threads 0, :active 0, :queued 0, :terminated false},
                 :scheduler {:threads 0, :active 0, :queued 0, :terminated false}},
     :programs {}}
raw docstring

runner:started?clj

(runner:started? {:keys [runtime] :as runner})

checks if runner is started

(runner:started? |run|) => true

checks if runner is started

(runner:started? |run|)
=> true
raw docstring

runner:stopclj

(runner:stop {:keys [runtime] :as runner})

stops the runner

stops the runner
raw docstring

runner:stopped?clj

(runner:stopped? {:keys [runtime] :as runner})

checks if runner has stopped

(-> (doto |run| (runner:kill)) (runner:stopped?)) => true

checks if runner has stopped

(-> (doto |run| (runner:kill))
    (runner:stopped?))
=> true
raw docstring

runner?clj

(runner? obj)

checks if object is a runner

(runner? |run|) => true

checks if object is a runner

(runner? |run|)
=> true
raw docstring

set-intervalclj

(set-interval {:keys [runtime] :as runner} program-id interval)
(set-interval {:keys [runtime] :as runner} program-id spawn-id interval)

manually overrides the interval for a spawn/program

(h/bench-ms (test-scaffold (fn [runner q] (set-interval runner :world 10) (spawn runner :world) (doall (for [i (range 2)] (cc/take q)))))) => #(<= 15 % 50)

manually overrides the interval for a spawn/program

(h/bench-ms
 (test-scaffold
  (fn [runner q]
    (set-interval runner :world 10)
    (spawn runner :world)
    (doall (for [i (range 2)]
             (cc/take q))))))
=> #(<= 15 % 50)
raw docstring

spawnclj

(spawn runner program-id)
(spawn {:keys [runtime] :as runner} program-id opts spawn-id)

spawns a runner that contains the program

spawns a runner that contains the program
raw docstring

stop-all-spawnclj

(stop-all-spawn runner)
(stop-all-spawn runner id)

stops all the running tasks

(-> (doto |rt3| (stop-all :test-program)) (count-spawn :test-program)) => 0

stops all the running tasks

(-> (doto |rt3|
      (stop-all :test-program))
    (count-spawn :test-program))
=> 0
raw docstring

stop-spawnclj

(stop-spawn runner program-id spawn-id)

stop a spawn and waits for jobs to finish

stop a spawn and waits for jobs to finish
raw docstring

triggerclj

(trigger runner program-id)
(trigger runner program-id t)

triggers the program manually, without spawning

(test-scaffold (fn [runner q] (trigger runner :world) (trigger runner :world) (count q))) => 2

triggers the program manually, without spawning

(test-scaffold
 (fn [runner q]
   (trigger runner :world)
   (trigger runner :world)
   (count q)))
=> 2
raw docstring

uninstallclj

(uninstall {:keys [runtime] :as runner} program-id)

uninstalls a program

uninstalls a program
raw docstring

unspawnclj

(unspawn {:keys [runtime] :as runner} program-id)

unspawns the running program

unspawns the running program
raw docstring

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

× close