add hwcdn01
This commit is contained in:
parent
a0f5d94499
commit
2883756d73
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue