Smith::Tools::BashJobs
Inherits Reference < Object
Constructors
new(dir : String, max_jobs : Int32 = 10)
SourceInstance methods
[](id : String) : BashJob | Nil
Sourcedir
Sourcediscard(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.
jobs
Sourcemax_jobs
Sourceon_exit
Sourceon_exit=(on_exit : Proc(BashJob, Nil) | Nil)
Sourceon_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.
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.
running
Sourceshutdown_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.
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.