task.go 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. package model
  2. import "time"
  3. // const var
  4. const (
  5. TaskStateSearch = int32(2) //查询执行中
  6. TaskStateDelDM = int32(3) //删除执行中
  7. TaskStateFail = int32(4) //执行失败
  8. TaskStatePause = int32(5) //任务中断
  9. TaskStateSuc = int32(6) //执行成功
  10. TaskStateDel = int32(8) //任务被删除
  11. TaskStateWait = int32(9) //等待执行删除
  12. // 数据平台返回的弹幕任务查询状态
  13. TaskSearchSuc = int32(1) // 查询完成
  14. TaskSearchFail = int32(2) // 查询失败
  15. // 企业微信通知
  16. TaskNoticeTitle = "弹幕任务删除过多告警"
  17. TaskNoticeContent = "弹幕任务(id:%d, title:%s)已删除%d条弹幕,已经被暂停,请前往管理后台查看"
  18. )
  19. // TaskInfo .
  20. type TaskInfo struct {
  21. ID int64
  22. Topic string
  23. State int32
  24. Count int64
  25. Result string
  26. Sub int32
  27. LastIndex int32
  28. Priority int64
  29. Title string
  30. Creator string
  31. Reviewer string
  32. }
  33. // SubTask .
  34. type SubTask struct {
  35. ID int64
  36. Operation int32
  37. Rate int32
  38. Tcount int64 //删除总数
  39. Start time.Time
  40. End time.Time
  41. }