twitter_stream.rb 484 B

123456789101112131415
  1. #!/usr/bin/env ruby
  2. # This process is used by TwitterStreamAgents to watch the Twitter stream in real time. It periodically checks for
  3. # new or changed TwitterStreamAgents and starts to follow the stream for them. It is typically run by foreman via
  4. # the included Procfile.
  5. unless defined?(Rails)
  6. puts
  7. puts "Please run me with rails runner, for example:"
  8. puts " RAILS_ENV=production bundle exec rails runner bin/twitter_stream.rb"
  9. puts
  10. exit 1
  11. end
  12. TwitterStream.new.run