Browse Source

同步配置任务创建、定时任务开启

liweiquan 2 years ago
parent
commit
47e3920c77
2 changed files with 1 additions and 6 deletions
  1. 0 6
      app/schemas/jm_job_info.py
  2. 1 0
      app/services/job_info.py

+ 0 - 6
app/schemas/jm_job_info.py

@@ -110,12 +110,6 @@ class JmJobInfoUpdate(JmJobInfoBase):
 class JmJobInfoStatusUpdate(BaseModel):
     id: int
     status: int
-    # 用户id
-    user_id: str
-    # 用户名称
-    user_name: str
-    # 项目id
-    project_id: str
     class Config:
         schema_extra = {
             "example": {

+ 1 - 0
app/services/job_info.py

@@ -36,6 +36,7 @@ def create_job_info_services(db: Session, item: schemas.JobInfoCreate):
         'partition_info': partition_info_str,
     })
     db_item = models.JobInfo(**item_dict, **{
+        'user_id': g.user_id,
         'project_id': g.project_id,
         'trigger_status': 0,
         'create_time': create_time,