我正在使用从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)