jvantuyl / phoenix_pubsub_postgresql

Phoenix PubSub adapter based on PostgreSQL LISTEN / NOTIFY
Other
22 stars 0 forks source link

DB unavailability handling #2

Open prepor opened 4 months ago

prepor commented 4 months ago

Hi!

In case of DB disconnection and (probably short) DB unavailability phoenix_pubsub_postgresql crashes constantly on restarts and as a result, crashes the whole supervisors tree. I would love to keep the app running with periodic reconnection attempts.

What do you think? Is this intended behavior? Any way how to change it?

prepor commented 4 months ago

Postgrex.Notifications supports :auto_reconnect option https://hexdocs.pm/postgrex/Postgrex.Notifications.html#start_link/1