af_run.py 634 B

123456789101112131415161718
  1. from sqlalchemy import Column, Integer, String, JSON, Float
  2. from sqlalchemy.dialects.mysql import DOUBLE
  3. from app.models.database import BaseModel
  4. class AirflowRun(BaseModel):
  5. __tablename__ = "airflow_run"
  6. id = Column(Integer, primary_key=True, index=True)
  7. start_time = Column(DOUBLE) # 开始时间
  8. end_time = Column(DOUBLE) # 结束时间
  9. job_id = Column(Integer) # 所属任务
  10. af_run_id = Column(String(60)) # run id in airflow
  11. run_ts = Column(String(60)) # run timestamp
  12. status = Column(Integer) # 0队列中 1运行中 2成功 3失败
  13. details = Column(JSON) # 任务执行详情