This commit is contained in:
rxdn 2022-07-12 22:24:43 +01:00
parent 27d6d97a99
commit f44912eca9
3 changed files with 5 additions and 3 deletions

View File

@ -21,11 +21,11 @@ func ConnectToDatabase() {
} }
// TODO: Sentry // TODO: Sentry
config.ConnConfig.LogLevel = pgx.LogLevelDebug config.ConnConfig.LogLevel = pgx.LogLevelWarn
config.ConnConfig.Logger = logrusadapter.NewLogger(logrus.New()) config.ConnConfig.Logger = logrusadapter.NewLogger(logrus.New())
config.MinConns = 1 config.MinConns = 1
config.MaxConns = 2 config.MaxConns = 3
config.ConnConfig.BuildStatementCache = func(conn *pgconn.PgConn) stmtcache.Cache { config.ConnConfig.BuildStatementCache = func(conn *pgconn.PgConn) stmtcache.Cache {
return stmtcache.New(conn, stmtcache.ModeDescribe, 512) return stmtcache.New(conn, stmtcache.ModeDescribe, 512)

2
go.mod
View File

@ -6,7 +6,7 @@ require (
github.com/BurntSushi/toml v0.3.1 github.com/BurntSushi/toml v0.3.1
github.com/TicketsBot/archiverclient v0.0.0-20220326163414-558fd52746dc github.com/TicketsBot/archiverclient v0.0.0-20220326163414-558fd52746dc
github.com/TicketsBot/common v0.0.0-20220703211704-f792aa9f0c42 github.com/TicketsBot/common v0.0.0-20220703211704-f792aa9f0c42
github.com/TicketsBot/database v0.0.0-20220710122820-0fdcde6692f0 github.com/TicketsBot/database v0.0.0-20220712212403-61804b8beb18
github.com/TicketsBot/logarchiver v0.0.0-20220326162808-cdf0310f5e1c github.com/TicketsBot/logarchiver v0.0.0-20220326162808-cdf0310f5e1c
github.com/TicketsBot/worker v0.0.0-20220710121124-cd5ec72739f9 github.com/TicketsBot/worker v0.0.0-20220710121124-cd5ec72739f9
github.com/apex/log v1.1.2 github.com/apex/log v1.1.2

2
go.sum
View File

@ -7,6 +7,8 @@ github.com/TicketsBot/common v0.0.0-20220703211704-f792aa9f0c42 h1:3/qnbrEfL8gqS
github.com/TicketsBot/common v0.0.0-20220703211704-f792aa9f0c42/go.mod h1:WxHh6bY7KhIqdayeOp5f0Zj2NNi/7QqCQfMEqHnpdAM= github.com/TicketsBot/common v0.0.0-20220703211704-f792aa9f0c42/go.mod h1:WxHh6bY7KhIqdayeOp5f0Zj2NNi/7QqCQfMEqHnpdAM=
github.com/TicketsBot/database v0.0.0-20220710122820-0fdcde6692f0 h1:1lrgdlmyf0KFkl4Y3Cu1L6BQzKOzowoLUp/Kq/jwfvc= github.com/TicketsBot/database v0.0.0-20220710122820-0fdcde6692f0 h1:1lrgdlmyf0KFkl4Y3Cu1L6BQzKOzowoLUp/Kq/jwfvc=
github.com/TicketsBot/database v0.0.0-20220710122820-0fdcde6692f0/go.mod h1:F57cywrZsnper1cy56Bx0c/HEsxQBLHz3Pl98WXblWw= github.com/TicketsBot/database v0.0.0-20220710122820-0fdcde6692f0/go.mod h1:F57cywrZsnper1cy56Bx0c/HEsxQBLHz3Pl98WXblWw=
github.com/TicketsBot/database v0.0.0-20220712212403-61804b8beb18 h1:p3rr325yK5CqWQMBML1SzkC+mXx+SSaBq4PnyxeBYXA=
github.com/TicketsBot/database v0.0.0-20220712212403-61804b8beb18/go.mod h1:F57cywrZsnper1cy56Bx0c/HEsxQBLHz3Pl98WXblWw=
github.com/TicketsBot/logarchiver v0.0.0-20220326162808-cdf0310f5e1c h1:OqGjFH6mbE6gd+NqI2ARJdtH3UUvhiAkD0r0fhGJK2s= github.com/TicketsBot/logarchiver v0.0.0-20220326162808-cdf0310f5e1c h1:OqGjFH6mbE6gd+NqI2ARJdtH3UUvhiAkD0r0fhGJK2s=
github.com/TicketsBot/logarchiver v0.0.0-20220326162808-cdf0310f5e1c/go.mod h1:jgi2OXQKsd5nUnTIRkwvPmeuD/i7OhN68LKMssuQY1c= github.com/TicketsBot/logarchiver v0.0.0-20220326162808-cdf0310f5e1c/go.mod h1:jgi2OXQKsd5nUnTIRkwvPmeuD/i7OhN68LKMssuQY1c=
github.com/TicketsBot/ttlcache v1.6.1-0.20200405150101-acc18e37b261 h1:NHD5GB6cjlkpZFjC76Yli2S63/J2nhr8MuE6KlYJpQM= github.com/TicketsBot/ttlcache v1.6.1-0.20200405150101-acc18e37b261 h1:NHD5GB6cjlkpZFjC76Yli2S63/J2nhr8MuE6KlYJpQM=