issues fixes related to autaitmioan and ai idea genration
This commit is contained in:
@@ -82,14 +82,41 @@ def run_automation_task(self, run_id: str):
|
||||
try:
|
||||
service = AutomationService.from_run_id(run_id)
|
||||
|
||||
# Run all stages sequentially
|
||||
# Run all stages sequentially, checking for pause/cancel between stages
|
||||
service.run_stage_1()
|
||||
if service.run.status in ['paused', 'cancelled']:
|
||||
logger.info(f"[AutomationTask] Automation {service.run.status} after stage 1")
|
||||
return
|
||||
|
||||
service.run_stage_2()
|
||||
if service.run.status in ['paused', 'cancelled']:
|
||||
logger.info(f"[AutomationTask] Automation {service.run.status} after stage 2")
|
||||
return
|
||||
|
||||
service.run_stage_3()
|
||||
if service.run.status in ['paused', 'cancelled']:
|
||||
logger.info(f"[AutomationTask] Automation {service.run.status} after stage 3")
|
||||
return
|
||||
|
||||
service.run_stage_4()
|
||||
if service.run.status in ['paused', 'cancelled']:
|
||||
logger.info(f"[AutomationTask] Automation {service.run.status} after stage 4")
|
||||
return
|
||||
|
||||
service.run_stage_5()
|
||||
if service.run.status in ['paused', 'cancelled']:
|
||||
logger.info(f"[AutomationTask] Automation {service.run.status} after stage 5")
|
||||
return
|
||||
|
||||
service.run_stage_6()
|
||||
if service.run.status in ['paused', 'cancelled']:
|
||||
logger.info(f"[AutomationTask] Automation {service.run.status} after stage 6")
|
||||
return
|
||||
|
||||
service.run_stage_7()
|
||||
if service.run.status in ['paused', 'cancelled']:
|
||||
logger.info(f"[AutomationTask] Automation {service.run.status} after stage 7")
|
||||
return
|
||||
|
||||
logger.info(f"[AutomationTask] Completed automation run: {run_id}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user