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}")
|
||||
|
||||
|
||||
@@ -244,7 +244,8 @@ class ContentIdeas(SoftDeletableModel, SiteSectorBaseModel):
|
||||
|
||||
idea_title = models.CharField(max_length=255, db_index=True)
|
||||
description = models.TextField(blank=True, null=True)
|
||||
target_keywords = models.CharField(max_length=500, blank=True) # Comma-separated keywords (legacy)
|
||||
primary_focus_keywords = models.CharField(max_length=500, blank=True, help_text="1-2 main keywords this content targets")
|
||||
target_keywords = models.CharField(max_length=500, blank=True) # Comma-separated keywords (covered_keywords from AI)
|
||||
keyword_objects = models.ManyToManyField(
|
||||
'Keywords',
|
||||
blank=True,
|
||||
|
||||
Reference in New Issue
Block a user