feat: initial commit
This commit is contained in:
@ -22,7 +22,7 @@ func NewQuizHandlerFromConfig(ctx context.Context, conf *config.Config) (*quiz.H
|
||||
return nil, errors.WithStack(err)
|
||||
}
|
||||
|
||||
return quiz.NewHandler(store, conf.Quiz.PlayInterval, conf.Quiz.PlayPeriod, conf.Quiz.PlayDelay), nil
|
||||
return quiz.NewHandler(store, conf.Quiz.PlayInterval, conf.Quiz.PlayPeriod, conf.Quiz.PlayDelay, conf.Quiz.OffDays), nil
|
||||
}
|
||||
|
||||
func loadEmbeddedQuizz(ctx context.Context, st *store.Store) error {
|
||||
|
@ -21,6 +21,13 @@ var getStoreFromConfig = createFromConfigOnce(func(ctx context.Context, conf *co
|
||||
return nil, errors.WithStack(err)
|
||||
}
|
||||
|
||||
sqlDB, err := db.DB()
|
||||
if err != nil {
|
||||
return nil, errors.WithStack(err)
|
||||
}
|
||||
|
||||
sqlDB.SetMaxOpenConns(1)
|
||||
|
||||
if conf.Store.Debug {
|
||||
db = db.Debug()
|
||||
}
|
||||
|
Reference in New Issue
Block a user