Should ActiveJob async be used with ActiveRecord::Base.connection_pool.with_connection?

22 views
Skip to first unread message

Hun-soo Jung

unread,
Aug 13, 2017, 5:30:41 PM8/13/17
to Ruby on Rails: Core
Hi.

I personally have positive prospect with the ActiveJob async adapter, which is provided by Rails core. The :async seems to be similar to the sucker punch plugin, and the sucker punch guides to use the ActiveRecord::Base.connection_pool.with_connection not to hold the DB connection over.

Should I use the 'ActiveRecord::Base.connection_pool.with_connection' to handle the AR in the job on :async too, or don't need to take care of it (since maybe the core will be dealing with)?

For a bit of my tests didn't showed a problem locally, it was definitely not enough.

I've googled and looked for the documents but no luck.

Thanks.
Reply all
Reply to author
Forward
0 new messages