Class: Mosaic::Poller
- Inherits:
-
Object
- Object
- Mosaic::Poller
- Includes:
- Singleton
- Defined in:
- lib/mosaic/poller.rb,
lib/mosaic/poller/version.rb
Constant Summary collapse
- VERSION =
"0.5.0"
Instance Method Summary collapse
-
#initialize(name, options = {}) ⇒ Poller
constructor
A new instance of Poller.
- #run ⇒ Object
Constructor Details
#initialize(name, options = {}) ⇒ Poller
Returns a new instance of Poller.
8 9 10 11 12 |
# File 'lib/mosaic/poller.rb', line 8 def initialize(name, = {}) @name = name @stopped = false @poll_interval = [:poll_interval] || 15 end |
Instance Method Details
#run ⇒ Object
14 15 16 17 18 19 |
# File 'lib/mosaic/poller.rb', line 14 def run Daemons.run_proc(@name, :dir => File.('tmp/pids'), :dir_mode => :normal, :backtrace => true) do reload process end end |