cmp.worker.ctrl-mp

exec-index

(exec-index {mp :Mp, no-idx :Container, state-key :StateKey, cmd :Cmd, :as task})

Registers a level b callback for the ith container of the mpd mp.

exec-title

(exec-title {mp :Mp, cont-title :ContainerTitle, state-key :StateKey, cmd :Cmd})

Searches for the given :ContainerTitle. Extracts the no-idx and uses the exec-index function to register a callback.

gen-callback

(gen-callback {mp :Mp, no-idx :Container, state-key :StateKey, cmd :Cmd})

run-mp!

(run-mp! {title :ContainerTitle, index :Container, state-key :StateKey, :as task})

Runs a certain container of a mpd. :ContainerTitle is prefered over :Container if both are given. The task is marked as :executed if all tasks in the container are executed.

stop-mp!

(stop-mp! {mp :Mp, title :ContainerTitle, index :Container, state-key :StateKey, :as task})

Stops a certain container of a mpd. :ContainerTitle is prefered over :Container if both are given. Checks if the container to stop is the same? as the task runs in:

  • If so: the ctrl interface is set to stop (and nothing else). The stop process turns all states to ready.
  • If not: the task (resp. the :value of :StateKey) is set to :executed after stopping.

title->no-idx

(title->no-idx mp title)