123456789101112131415161718192021222324 |
- package cache
- import (
- "eta_gn/eta_api/models/data_manage"
- "eta_gn/eta_api/utils"
- "fmt"
- )
- // 将替换指标操作加入到队列中
- func AddReplaceEdbInfo(oldEdbInfo, newEdbInfo *data_manage.EdbInfo) bool {
- record := new(data_manage.ReplaceEdbInfoItem)
- record.OldEdbInfo = oldEdbInfo
- record.NewEdbInfo = newEdbInfo
- if utils.Re == nil {
- err := utils.Rc.LPush(utils.CACHE_KEY_REPLACE_EDB, record)
- utils.FileLog.Info(fmt.Sprintf("指标替换 加入缓存 AddReplaceEdbInfo LPush: 旧指标ID:%d,新指标ID:%d", oldEdbInfo.EdbInfoId, newEdbInfo.EdbInfoId))
- if err != nil {
- fmt.Println("AddReplaceEdbInfo LPush Err:" + err.Error())
- }
- return true
- }
- return false
- }
|