Rails change ActiveJob adapter for a single job
|Added at||2016-10-03 14:10|
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
Any way to do that ?