Question: Rails change ActiveJob adapter for a single job

Question

Rails change ActiveJob adapter for a single job

Answers 0
Added at 2016-10-03 14:10
Tags
Question

I have some scheduled tasks that run jobs with a real queue service.

Now, I want to be able to run those tasks manually from a dashboard, wait for its execution, and read/process some of its outputs in a controller action. The typical case being when an admin wants to manually reload some statistics, and it's fine to stall the server for a couple secs.

Is there a way to change the ActiveJob adapter to "inline" in order to do that ? If possible I'd also like to read some artifacts generated by this job (could be instance variables, or the return value of the performaction).

Any way to do that ?

Answers
Source Show
◀ Wstecz