mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-14 13:16:28 +08:00
9 lines
207 B
Ruby
9 lines
207 B
Ruby
|
module BackgroundJobs
|
||
|
def run_background_jobs_immediately
|
||
|
delay_jobs = Delayed::Worker.delay_jobs
|
||
|
Delayed::Worker.delay_jobs = false
|
||
|
yield
|
||
|
Delayed::Worker.delay_jobs = delay_jobs
|
||
|
end
|
||
|
end
|