|
@@ -146,9 +146,11 @@ func DeleteAttachment(bucketID, objectName string) error {
|
|
|
func LoadOSSAccounts() {
|
|
|
var oas []*config.OSSAccount
|
|
|
g.Config().MustGet(gctx.New(), "oss_accounts").Structs(&oas)
|
|
|
+ accountMap.Clear()
|
|
|
for _, acc := range oas {
|
|
|
- accountMap.LoadOrStore(acc.ID, *acc)
|
|
|
+ accountMap.Store(acc.ID, *acc)
|
|
|
}
|
|
|
+ bucketPool.Clear()
|
|
|
}
|
|
|
|
|
|
// 获取标讯正文,优先从oss中取,再从es中取
|