--- category: '' date: '2023-06-30T22:59:39Z' description: '' link: '' slug: '' tags: croupier, crystal, programming title: Croupier version v0.3.1 is out type: text ---
Inotify support by @ralsina in #1
This adds the TaskManager.auto_run
method that monitors task inputs and
reruns tasks as needed, and TaskManager.auto_stop
to stop it.
This will be useful for Hacé (the croupier-based make-like) and Nicolino
(a SSG)
Here's an example from the tests:
x = 0
counter = TaskProc.new { x += 1; x.to_s }
Task.new(output: "t1", inputs: ["i"], proc: counter)
TaskManager.auto_run
# We need to yield or else the watch callbacks never run
Fiber.yield
File.open("i", "w") << "foo"
Fiber.yield
TaskManager.auto_stop
# It should have run
(x > 0).should be_true
Full Changelog: v0.3.0...v0.3.1