job_info.py 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. from sqlalchemy import Boolean, Column, ForeignKey, Integer, String
  2. from app.models.database import BaseModel
  3. class JobInfo(BaseModel):
  4. __tablename__ = "job_info"
  5. id = Column(Integer, primary_key=True, index=True)
  6. # 选择周期类型(0:时,1:日,2:周,3:月,4:cron)
  7. cron_select_type = Column(Integer)
  8. # 任务执行CRON
  9. job_cron = Column(String, nullable=False, index=True)
  10. # 任务描述
  11. job_desc = Column(String, nullable=False)
  12. # 创建时间
  13. create_time = Column(Integer)
  14. # 更新时间
  15. update_time = Column(Integer)
  16. # 创建人
  17. user_id = Column(String, nullable=False)
  18. # 执行器路由策略
  19. executor_route_strategy = Column(String)
  20. # 执行器任务handler
  21. executor_handler = Column(String)
  22. # 执行器任务参数
  23. executor_param = Column(String)
  24. # 阻塞处理策略
  25. executor_block_strategy = Column(String)
  26. # 任务超时时间, 单位分钟
  27. executor_timeout = Column(Integer, nullable=False)
  28. # 失败重试次数
  29. executor_fail_retry_count = Column(Integer, nullable=False)
  30. # 调度状态: 0-停止 1-运行
  31. trigger_status = Column(Integer, nullable=False)
  32. # 上次调度时间
  33. trigger_last_time = Column(Integer)
  34. # 下次调度时间
  35. trigger_next_time = Column(Integer)
  36. # datax运行脚本
  37. job_json = Column(String)
  38. # 增量初始时间
  39. inc_start_time = Column(Integer)
  40. # 最近一次执行状态
  41. last_handle_code = Column(Integer)
  42. # 数据状态 0-删除 1-正常
  43. delete_status = Column(Integer, nullable=False)
  44. # 增量时间
  45. replace_param = Column(String)
  46. # 分区信息
  47. partition_info = Column(String)
  48. # jvm参数
  49. jvm_param = Column(String)
  50. # 上次时间字段
  51. last_time = Column(String)
  52. # 当前时间字段
  53. current_time = Column(String)
  54. # 项目id
  55. project_id = Column(String, nullable=False)