1
mirror of https://gitlab.com/commento/commento.git synced 2025-06-29 22:56:37 -04:00

api: retry database connection if it fails

Closes https://gitlab.com/commento/commento-ce/issues/52
This commit is contained in:
Adhityaa
2018-06-20 09:19:39 +05:30
parent 237a02bee9
commit 510257fd8b
3 changed files with 16 additions and 3 deletions

View File

@ -68,7 +68,7 @@ func setupTestDatabase() error {
os.Setenv("POSTGRES", "postgres://postgres:postgres@localhost/commento_test?sslmode=disable")
}
if err := connectDB(); err != nil {
if err := connectDB(0); err != nil {
return err
}