mirror of
https://github.com/multipleof4/ntfy.git
synced 2026-10-08 21:05:21 +00:00
Refine, log unhealthy replica
This commit is contained in:
+2
-2
@@ -380,11 +380,11 @@ func createUserManager(c *cli.Context) (*user.Manager, error) {
|
||||
QueueWriterInterval: user.DefaultUserStatsQueueWriterInterval,
|
||||
}
|
||||
if databaseURL != "" {
|
||||
pool, dbErr := pg.Open(databaseURL)
|
||||
host, dbErr := pg.Open(databaseURL)
|
||||
if dbErr != nil {
|
||||
return nil, dbErr
|
||||
}
|
||||
return user.NewPostgresManager(db.NewDB(pool, nil), authConfig)
|
||||
return user.NewPostgresManager(db.New(host, nil), authConfig)
|
||||
} else if authFile != "" {
|
||||
if !util.FileExists(authFile) {
|
||||
return nil, errors.New("auth-file does not exist; please start the server at least once to create it")
|
||||
|
||||
Reference in New Issue
Block a user