|
@@ -93,13 +93,14 @@ def dag_job_submit(dag_uuid:str,dag_script: str,db: Session):
|
|
|
af_job = dag_create_job(dag_uuid, dag_script, db)
|
|
|
else:
|
|
|
af_job = dag_update_job(dag_uuid, dag_script, db)
|
|
|
- current_time = int(time.time())
|
|
|
+ get_job_last_parsed_time(af_job['id'])
|
|
|
+ current_time = res['data']['last_parsed_time'] if 'last_parsed_time' in res['data'].keys() else None
|
|
|
send_submit(af_job['id'])
|
|
|
for i in range(0,21):
|
|
|
time.sleep(2)
|
|
|
res = get_job_last_parsed_time(af_job['id'])
|
|
|
last_parsed_time = res['data']['last_parsed_time']
|
|
|
- if last_parsed_time and current_time < int(last_parsed_time):
|
|
|
+ if last_parsed_time and current_time != last_parsed_time:
|
|
|
send_pause(af_job['id'],1)
|
|
|
send_execute(af_job['id'])
|
|
|
print(f"{af_job['id']}<==执行成功==>{last_parsed_time}")
|