lib/streambot/retweet.rb in streambot-1.0.0 vs lib/streambot/retweet.rb in streambot-1.0.1
- old
+ new
@@ -6,10 +6,14 @@
@handler = StreamBot::OAuth.new(params['oauth'])
end
# retweets the status with given id
def retweet(id)
- LOG.info "retweet status ##{id}"
- @handler.post("/statuses/retweet/#{id}.json", nil)
+ # one thread per retweet,
+ # cause it's much, much faster
+ Thread.new do
+ LOG.info "retweet status ##{id}"
+ @handler.post("/statuses/retweet/#{id}.json", nil)
+ end
end
end
end