Module: SeigenWatchdog
- Defined in:
- lib/seigen_watchdog.rb,
lib/seigen_watchdog/monitor.rb,
lib/seigen_watchdog/version.rb,
lib/seigen_watchdog/killers/base.rb,
lib/seigen_watchdog/limiters/rss.rb,
lib/seigen_watchdog/limiters/base.rb,
lib/seigen_watchdog/limiters/time.rb,
lib/seigen_watchdog/killers/signal.rb,
lib/seigen_watchdog/limiters/custom.rb,
lib/seigen_watchdog/limiters/counter.rb
Overview
Monitoring and watchdog module for Ruby applications
Defined Under Namespace
Modules: Killers, Limiters Classes: Error, Monitor
Constant Summary collapse
- VERSION =
: String
'0.3.0'
Class Attribute Summary collapse
-
.monitor ⇒ Object
readonly
: Monitor?.
Class Method Summary collapse
-
.start(check_interval:, killer:, limiters:, logger: nil, on_exception: nil, before_kill: nil) ⇒ Object
Starts the SeigenWatchdog monitor.
-
.started? ⇒ Boolean
Checks if the monitor has been started Returns true if the monitor is started.
-
.stop ⇒ Object
Stops the SeigenWatchdog monitor.
Class Attribute Details
.monitor ⇒ Object (readonly)
: Monitor?
12 13 14 |
# File 'lib/seigen_watchdog.rb', line 12 def monitor @monitor end |
Class Method Details
.start(check_interval:, killer:, limiters:, logger: nil, on_exception: nil, before_kill: nil) ⇒ Object
Starts the SeigenWatchdog monitor
22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/seigen_watchdog.rb', line 22 def start(check_interval:, killer:, limiters:, logger: nil, on_exception: nil, before_kill: nil) stop if started? @monitor = Monitor.new( check_interval: check_interval, killer: killer, limiters: limiters, logger: logger, on_exception: on_exception, before_kill: before_kill ) end |
.started? ⇒ Boolean
Checks if the monitor has been started Returns true if the monitor is started
47 48 49 |
# File 'lib/seigen_watchdog.rb', line 47 def started? !@monitor.nil? end |
.stop ⇒ Object
Stops the SeigenWatchdog monitor
37 38 39 40 41 42 |
# File 'lib/seigen_watchdog.rb', line 37 def stop return unless @monitor @monitor.stop @monitor = nil end |