Sha256: d821bafe1532e882b74df0fb614a40e3fedf2d6de2574c7c8c4346e59ecee73c
Contents?: true
Size: 453 Bytes
Versions: 5
Compression:
Stored size: 453 Bytes
Contents
require 'twitter' module Resque module Plugins module RateLimitedQueue class TwitterQueue < BaseApiQueue @queue = :twitter_api def self.perform(klass, *params) super rescue Twitter::Error::TooManyRequests, Twitter::Error::EnhanceYourCalm => e pause_for(Time.now + e.rate_limit.reset_in) rate_limited_requeue(self, klass, *params) end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems