Class: Weeter::Runner
- Inherits:
-
Object
- Object
- Weeter::Runner
- Defined in:
- lib/weeter/runner.rb
Instance Method Summary collapse
-
#initialize(config) ⇒ Runner
constructor
A new instance of Runner.
- #start ⇒ Object
Constructor Details
Instance Method Details
#start ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/weeter/runner.rb', line 11 def start EM.run { subscription_plugin.get_initial_filters do |filter_params| Weeter.logger.info("Connecting to twitter with initial filters") tweet_consumer.connect(filter_params) subscription_plugin.listen_for_filter_update(tweet_consumer) trap('TERM') do Weeter.logger.info("Stopping weeter") EM.stop if EM.reactor_running? end end } end |