mirror of
https://github.com/discourse/discourse.git
synced 2025-02-12 06:42:57 +08:00
DEV: allow queue_jobs = false in dev
your mileage may vary
This commit is contained in:
parent
d15068da70
commit
7c5a71e929
|
@ -200,7 +200,13 @@ module Jobs
|
||||||
# Otherwise execute the job right away
|
# Otherwise execute the job right away
|
||||||
opts.delete(:delay_for)
|
opts.delete(:delay_for)
|
||||||
opts[:sync_exec] = true
|
opts[:sync_exec] = true
|
||||||
klass.new.perform(opts)
|
if Rails.env == "development"
|
||||||
|
Scheduler::Defer.later("job") do
|
||||||
|
klass.new.perform(opts)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
klass.new.perform(opts)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user