class

Earl::Supervisor

Inherits Earl::Logger < Earl::Agent < Reference < Object

Supervises other agents.

  • Spawns agents in their dedicated Fiber.
  • Recycles and restarts crashed agents.
  • Eventually stops when all agents have stopped.

Constructors

new

Instance methods

call

Spawns all agents to supervise in their dedicated Fiber. Blocks until all agents have stopped.

monitor(agent : Agent) : Nil

Adds an agent to supervise.

reset

Recycles all supervised agents.

terminate

Asks all supervised agents to stop.

trap(agent : Agent, exception : Exception | Nil) : Nil

Recycles and restarts crashed agents. Take note that an agent has stopped.