Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move database config validation out of config #36

Open
jisantuc opened this issue May 16, 2022 · 0 comments
Open

Move database config validation out of config #36

jisantuc opened this issue May 16, 2022 · 0 comments

Comments

@jisantuc
Copy link
Contributor

To check to make sure that the database parameters can actually be used to connect to a database,
right now the JVM app calls .validate from decline and unsafely runs a quick query right now to see if it
succeeds.

However, this is impossible on JS -- unsafeRunSync doesn't exist on IO in scala.js, and you can't call Await.result on a future https://www.scala-js.org/doc/project/linking-errors.html#using-blocking-apis-eg-awaitresult

This effect could pretty easily be moved out to app startup instead, which I think would let both apps verify connectivity before they
fully start up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant