priority?

6 views
Skip to first unread message

badnaam

unread,
Aug 26, 2010, 3:06:42 AM8/26/10
to delayed_job
Does the priority work on the delay call?

I have this..


def self.p1
logger.info 'p1'
puts "p1"
end
def self.p2
logger.info "p2"
puts "p2"
end
def self.p3
User.delay(:priority => 10).p1
User.delay.p2

end
When I call User.p3, I notice that p2 is always executed before p1,
even though it has lower priority.

Thanks

David Genord II

unread,
Aug 30, 2010, 11:53:18 AM8/30/10
to delay...@googlegroups.com
Depending on which version of delayed job you are running p2 actually has the higher priority. Priority was inverted a while back on the collectiveidea fork, which is what you will get if you gem install delayed_job.

David Genord II
Reply all
Reply to author
Forward
0 new messages