elixir-ecto / db_connection

Database connection behaviour
http://hexdocs.pm/db_connection/DBConnection.html
306 stars 113 forks source link

Don't log when owner/client exits if normal or shutdown #40

Closed fishcakez closed 8 years ago

josevalim commented 8 years ago

We only log If the someone is currently using the connection. So I think we should always log, regardless of the reason. No?

José Valim www.plataformatec.com.br Skype: jv.ptec Founder and Director of R&D

fishcakez commented 8 years ago

Ah just for clients and not the owner, you are right.

On 25 May 2016 at 11:56, José Valim notifications@github.com wrote:

We only log If the someone is currently using the connection. So I think we should always log, regardless of the reason. No?

José Valim www.plataformatec.com.br Skype: jv.ptec Founder and Director of R&D

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/fishcakez/db_connection/issues/40#issuecomment-221539830

fishcakez commented 8 years ago

This is for all pools btw, not ownership in particular.

On 25 May 2016 at 12:25, James Fish james@fishcakez.com wrote:

Ah just for clients and not the owner, you are right.

On 25 May 2016 at 11:56, José Valim notifications@github.com wrote:

We only log If the someone is currently using the connection. So I think we should always log, regardless of the reason. No?

José Valim www.plataformatec.com.br Skype: jv.ptec Founder and Director of R&D

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/fishcakez/db_connection/issues/40#issuecomment-221539830

fishcakez commented 8 years ago

@josevalim can you pick this up for and then change version in mix.exs 1.0.0-dev? We can't push a release as we are pointing at a git tag for sbroker and need to work on down stream repos first. In DBConnection.Connection we need to check the :DOWN reason and not log when reason is normal or shutdown. Ownership already does the correct thing.

fishcakez commented 8 years ago

@josevalim ok ill pickup :smile:

fishcakez commented 8 years ago

Closed in https://github.com/fishcakez/db_connection/commit/abfbc0b19ce0b10c189c118769740198a2b03cd4

josevalim commented 8 years ago

@fishcakez I was planning to do this today but glad you got to it first, thanks James! :heart: :green_heart: :blue_heart: :yellow_heart: :purple_heart: