mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-14 05:05:55 +08:00
8 lines
207 B
Ruby
8 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
|