我正在使用從collectiveidea的delayed_job 2.1.4,它似乎執行方法永遠不會被調用,即使作業處理並從隊列中刪除。我錯過了什麼嗎?執行不被稱爲延遲作業
我用Rails 3.0.5在Heroku
在控制器:
Delayed::Job.enqueue FacebookJob.new
在作業類:
class FacebookJob
def initialize
end
def perform
fb_auths = Authentication.where(:provider => 'facebook')
fb_auths.each do |auth|
checkins = FbGraph::User.new('me', :access_token => URI.encode(auth.token)).checkins
if checkins != nil
checkins.each do |checkin|
[...]
end
end
end
end
end
(整個代碼:https://gist.github.com/966509)