I'm running puma, sidekiq, and ruby-clock. ruby-clock is invoked with rails runner
. If I do something like restart my database, puma and sidekiq will figure it out and reconnect. But ruby-clock does not. Why is this happening? Are puma and sidekiq somehow instantiating the database pool with a config which allows reconnection?
The answer is that rails runner does not run code within an executor or reloader. Doing so fixed the problem.