issues fixes related to autaitmioan and ai idea genration

This commit is contained in:
IGNY8 VPS (Salman)
2026-01-15 02:21:44 +00:00
parent 6bb3dd3df4
commit e02ba76451
7 changed files with 349 additions and 3 deletions

View File

@@ -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}")