from sqlalchemy import Boolean, Column, ForeignKey, Integer, String from app.models.database import BaseModel class JobLog(BaseModel): __tablename__ = "job_log" id = Column(Integer, primary_key=True, index=True) # 执行器主键ID job_group = Column(Integer, nullable=False) # 任务主键ID job_id = Column(Integer, nullable=False) # 执行器地址,本次执行的地址 executor_address = Column(String) # 执行器任务handler executor_handler = Column(String) # 执行器任务参数 executor_param = Column(String) # 执行器任务分片参数,格式如1/2 executor_sharding_param = Column(String) # 失败重试次数 executor_fail_retry_count = Column(Integer) # 调度时间 trigger_time = Column(Integer) # 调度结果 trigger_code = Column(Integer, nullable=False) # 调度日志 trigger_msg = Column(String) # 执行时间 handle_time = Column(Integer) # 执行状态 handle_code = Column(Integer, nullable=False) # 执行日志 handle_msg = Column(String) # 告警状态:0-默认、1-无需告警、2-告警成功、3-告警失败 alarm_status = Column(Integer, nullable=False) # datax 进程ID process_id = Column(String)