()
| 21 | } |
| 22 | |
| 23 | func UpdateQuotaData() { |
| 24 | // recover |
| 25 | defer func() { |
| 26 | if r := recover(); r != nil { |
| 27 | common.SysLog(fmt.Sprintf("UpdateQuotaData panic: %s", r)) |
| 28 | } |
| 29 | }() |
| 30 | for { |
| 31 | if common.DataExportEnabled { |
| 32 | common.SysLog("正在更新数据看板数据...") |
| 33 | SaveQuotaDataCache() |
| 34 | } |
| 35 | time.Sleep(time.Duration(common.DataExportInterval) * time.Minute) |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | var CacheQuotaData = make(map[string]*QuotaData) |
| 40 | var CacheQuotaDataLock = sync.Mutex{} |
no test coverage detected