Closed monosoul closed 7 months ago
@sksamuel would it be okay if I update all healthchecks to have name as a constructor argument? I realized in some apps we have multiple datasources, so registering multiple DB healthchecks would also be handy.
Yep that works.
On Sat, Jan 20, 2024, 4:17 AM Andrei Nevedomskii @.***> wrote:
@sksamuel https://github.com/sksamuel would it be okay if I update all healthchecks to have name as a constructor argument? I realized in some apps we have multiple datasources, so registering multiple DB healthchecks would also be handy.
— Reply to this email directly, view it on GitHub https://github.com/sksamuel/cohort/pull/45#issuecomment-1902057335, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFVSGUTT2IYLWBVFSGF36LYPOKUPAVCNFSM6AAAAABB77LJK6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBSGA2TOMZTGU . You are receiving this because you were mentioned.Message ID: @.***>
Do you want to do that in this PR or as a follow on ?
@sksamuel did it all in this PR. I've also fixed DatabaseConnectionHealthCheck
since it was previously ignoring isValid
call result and made cohort-mongo
module usable with both sync
and async
clients (I kept the original MongoConnectionHealthCheck
there for backwards compatibility)
Niceeee
@sksamuel any chance you could release it this week? :innocent:
2.3.1 is out :)
Btw, @sksamuel you didn't create a release in GH. Not sure if that's a big problem, but I imagine might be confusing to people
Oops. I did now.
DatabaseConnectionHealthCheck
so that it returnsUnhealthy
if connection is invalid: e4ec143ef1e4014ae096438dbef5ca7490818040GenericMongoConnectionHealthCheck
that can be used with both sync and async clients, also changes the dependency config there so that it doesn't bringsync
client as a transitive dependency to projects using it: 86c566e021f127a2fce7d6b7fd2f89399bfde51e