Class: Emque::Consuming::CommandReceivers::Base
- Inherits:
-
Object
- Object
- Emque::Consuming::CommandReceivers::Base
- Includes:
- Helpers
- Defined in:
- lib/emque/consuming/command_receivers/base.rb
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#restart ⇒ Object
9 10 11 12 |
# File 'lib/emque/consuming/command_receivers/base.rb', line 9 def restart stop if running? start end |
#start ⇒ Object
14 15 16 |
# File 'lib/emque/consuming/command_receivers/base.rb', line 14 def start raise NotImplemented end |
#status ⇒ Object
23 24 25 |
# File 'lib/emque/consuming/command_receivers/base.rb', line 23 def status thread ? (thread.status || "stopped") : "stopped" end |
#stop ⇒ Object
18 19 20 21 |
# File 'lib/emque/consuming/command_receivers/base.rb', line 18 def stop thread.exit if running? status end |