Closed sushantmittal closed 9 years ago
@sushantmittal I did not mean to overwrite Delayed::Worker.default_priority
. What I meant was @@delayed_job_priority = Delayed::Worker.default_priority
instead of @@delayed_job_priority = 0
.
Oh I see. But it still sets the value 0 because of the following reason:
An application set the delayed_job default_priority in initializer. After the above change, default_priority will still get the value 0 that has been set in delayed_job gem instead of the value that has been set in an application.
@baschtl
Can you merge it if looks fine ?
Beyond that: +1
@sushantmittal BTW: have a look at https://github.com/mhfs/devise-async/pull/56. IMO it introduces a more general approach to the problem at hand. Hence, we should use this version.
@baschtl
Yeah it looks fine. I think only one test case missing in ' lib/devise/async.rb' for priority accessor. After that https://github.com/mhfs/devise-async/pull/56 is good to go.
@sushantmittal Ok, #56 is merged. Hence, I will close this PR. Thanks nevertheless for your contribution!
By this command, we can set the default priority for all jobs.
But this solution works when we want to set different priority for all devise mails.