Пример #1
0
func initHistoryDb(app *App) {
	historyDb, err := db.Open(app.config.DatabaseUrl)

	if err != nil {
		app.log.Panic(app.ctx, err)
	}
	app.historyDb = historyDb
}
Пример #2
0
func initCoreDb(app *App) {
	coreDb, err := db.Open(app.config.StellarCoreDatabaseUrl)

	if err != nil {
		app.log.Panic(app.ctx, err)
	}
	app.coreDb = coreDb
}
Пример #3
0
func initHistoryDb(app *App) {
	historyDb, err := db.Open(app.config.DatabaseUrl)

	if err != nil {
		log.Panic(err)
	}
	historyDb.SetMaxIdleConns(4)
	historyDb.SetMaxOpenConns(12)
	app.historyDb = historyDb
}
Пример #4
0
func initCoreDb(app *App) {
	coreDb, err := db.Open(app.config.StellarCoreDatabaseUrl)

	if err != nil {
		log.Panic(err)
	}

	coreDb.SetMaxIdleConns(4)
	coreDb.SetMaxOpenConns(12)
	app.coreDb = coreDb
}