job_log.py 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. from sqlalchemy import Boolean, Column, ForeignKey, Integer, String
  2. from app.models.database import BaseModel
  3. class JobLog(BaseModel):
  4. __tablename__ = "job_log"
  5. id = Column(Integer, primary_key=True, index=True)
  6. # 执行器主键ID
  7. job_group = Column(Integer, nullable=False)
  8. # 任务主键ID
  9. job_id = Column(Integer, nullable=False)
  10. # 执行器地址,本次执行的地址
  11. executor_address = Column(String)
  12. # 执行器任务handler
  13. executor_handler = Column(String)
  14. # 执行器任务参数
  15. executor_param = Column(String)
  16. # 执行器任务分片参数,格式如1/2
  17. executor_sharding_param = Column(String)
  18. # 失败重试次数
  19. executor_fail_retry_count = Column(Integer)
  20. # 调度时间
  21. trigger_time = Column(Integer)
  22. # 调度结果
  23. trigger_code = Column(Integer, nullable=False)
  24. # 调度日志
  25. trigger_msg = Column(String)
  26. # 执行时间
  27. handle_time = Column(Integer)
  28. # 执行状态
  29. handle_code = Column(Integer, nullable=False)
  30. # 执行日志
  31. handle_msg = Column(String)
  32. # 告警状态:0-默认、1-无需告警、2-告警成功、3-告警失败
  33. alarm_status = Column(Integer, nullable=False)
  34. # datax 进程ID
  35. process_id = Column(String)