replace_edb_info.go 523 B

12345678910111213141516171819202122
  1. package cache
  2. import (
  3. "eta/eta_mobile/models/data_manage"
  4. "eta/eta_mobile/utils"
  5. "fmt"
  6. )
  7. // 将替换指标操作加入到队列中
  8. func AddReplaceEdbInfo(oldEdbInfo, newEdbInfo *data_manage.EdbInfo) bool {
  9. record := new(data_manage.ReplaceEdbInfoItem)
  10. record.OldEdbInfo = oldEdbInfo
  11. record.NewEdbInfo = newEdbInfo
  12. if utils.Re == nil {
  13. err := utils.Rc.LPush(utils.CACHE_KEY_REPLACE_EDB, record)
  14. if err != nil {
  15. fmt.Println("AddReplaceEdbInfo LPush Err:" + err.Error())
  16. }
  17. return true
  18. }
  19. return false
  20. }