mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-12 12:16:06 +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
|