mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-31 04:32: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
|