Herokuで実行しようとしているSinatraアプリに組み込まれたかなり単純なTweetstreamリスナーがあります。正常に起動して実行されますが、約 1 分後に次のエラーが表示されます。
2012-12-04T06:23:31+00:00 heroku[web.1]: Stopping process with SIGKILL
2012-12-04T06:23:31+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
基本的に、私が実行しているものは次のとおりです。
require 'sinatra'
client = TwitterListener.new
puts "starting Twitter listener..."
client.restart
require 'tweetstream'
class TwitterListener
def initialize
@client = TweetStream::Client.new
...
@events = Events.new
end
def restart
...
@client.follow(users) do |status|
@events.mention_artist?(status, artists)
@events.retweet_artist?(status, artists)
end
end
end
ストリーミング リスナーを開始しており、十分に速くツイートすると、それを取得しますが、ツイート ストリーム ループ中に Heroku がタイムアウトしたようです。どうすればこれを修正できますか?