feat 提高数据库超时时间

This commit is contained in:
timerzz 2024-12-03 09:27:24 +08:00
parent 436ec577c2
commit 2cc7b5cfb7

View File

@ -32,7 +32,7 @@ func InitDefaultDatabase() (*gorm.DB, error) {
db.Logger = logger.New( db.Logger = logger.New(
log.New(os.Stdout, "\r\n", log.LstdFlags), log.New(os.Stdout, "\r\n", log.LstdFlags),
logger.Config{ logger.Config{
SlowThreshold: time.Second, SlowThreshold: time.Second * 3,
LogLevel: logger.Warn, LogLevel: logger.Warn,
Colorful: true, Colorful: true,
IgnoreRecordNotFoundError: true, IgnoreRecordNotFoundError: true,