Class: Euston::DaemonComponent

Inherits:
Object
  • Object
show all
Includes:
Euston::Daemons::Exceptions, Hollywood
Defined in:
lib/euston-daemons/euston/daemon_component.rb

Instance Method Summary collapse

Methods included from Euston::Daemons::Exceptions

#ignorable_exception?

Instance Method Details

#runObject



6
7
8
# File 'lib/euston-daemons/euston/daemon_component.rb', line 6

def run
  next_iteration unless stopped
end

#stopObject



10
11
12
13
# File 'lib/euston-daemons/euston/daemon_component.rb', line 10

def stop
  @stopped = true
  @channel.close unless @channel.nil? || !@channel.respond_to?(:close)
end