Arcana::Supervisor
Monitors actors and restarts them on crash.
Follows OTP supervision principles: actors are expected to crash, and the supervisor brings them back.
sup = Arcana::Supervisor.new(bus, dir, strategy: :one_for_one, max_restarts: 3, within: 5.seconds, ) sup.supervise(agent1) sup.supervise(agent2) sup.start
Constructors
new(bus : Bus, directory : Directory, strategy : Strategy = Strategy::OneForOne, max_restarts : Int32 = 3, within : Time::Span = 5.seconds)
SourceInstance methods
strategy
Source