add hwcdn01

This commit is contained in:
lwl0608 2024-05-06 17:36:16 +08:00
parent a0f5d94499
commit 2883756d73
2 changed files with 6 additions and 5 deletions

View File

@ -78,7 +78,7 @@ func InitLogger(config configcenter.LoggerConfig) {
rotatelogs.WithLinkName(config.FileAbsPath),
rotatelogs.WithMaxAge(time.Duration(86400*7)*time.Second),
rotatelogs.WithRotationTime(time.Duration(86400)*time.Second),
rotatelogs.WithRotationSize(1024*1024*500),
//rotatelogs.WithRotationSize(1024*1024*500),
)
var writers io.Writer

View File

@ -41,11 +41,12 @@ func SetFileServerDomainName(fileServerDomainName string) {
}
func (p *MediaFiller) GetFileServerDomain() string {
// cdn测试
//if rand.Intn(100) < 20 {
if rand.Intn(100) < 5 {
return "https://filecdnhw01.tiefen.fun/"
}
return "https://filecdn01.tiefen.fun/"
//}
return defaultMediaFiller.fileServerDomainName
//return defaultMediaFiller.fileServerDomainName
}
func FillEntity(ctx *gin.Context, entity MediaFillable) error {