class

Smith::Tools::BashJobs

Inherits Reference < Object

Constructors

new(dir : String, max_jobs : Int32 = 10)
Source

Instance methods

[](id : String) : BashJob | Nil
Source
discard(job : BashJob) : Nil

Drops a finished job and its log. The output has already been handed to the model, so keeping either would only accumulate.

Source
jobs
Source
max_jobs
Source
on_exit
Source
on_exit=(on_exit : Proc(BashJob, Nil) | Nil)
Source
on_start

Wired by the CLI to the renderers. The tools have no access to the event bus, and giving them one would put event knowledge into the core.

Source
on_start=(on_start : Proc(BashJob, Nil) | Nil)

Wired by the CLI to the renderers. The tools have no access to the event bus, and giving them one would put event knowledge into the core.

Source
running
Source
shutdown_all(grace : Time::Span = 5.seconds) : Nil

A dev server left running as an orphan, holding its port, is a bug and not a feature — so nothing survives the session that started it.

Source
start(command : String) : BashJob | Nil

nil when the limit is reached. Only jobs still running count, so a finished one does not hold a slot forever.

Source