Add status-aware auto_execute gate for Content Creation Phase 2
The scheduler's blanket auto_execute check was blocking "outline approved" Content Creation tasks from reaching Phase 2. Now checks auto_execute_on_status for status-specific overrides. Also adds trigger_hint to skip log messages for easier debugging. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>fix/customer-field-migration
parent
8f2ec48e10
commit
a3eacbd0e5
|
|
@ -385,12 +385,17 @@ class Scheduler:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# Respect auto_execute flag — skip tasks that require manual trigger
|
# Respect auto_execute flag — skip tasks that require manual trigger
|
||||||
|
# Unless the task status matches an auto_execute_on_status entry
|
||||||
mapping = skill_map[task.task_type]
|
mapping = skill_map[task.task_type]
|
||||||
if not mapping.get("auto_execute", False):
|
if not mapping.get("auto_execute", False):
|
||||||
log.debug(
|
status_triggers = mapping.get("auto_execute_on_status", [])
|
||||||
"Skipping task '%s' (type=%s): auto_execute is false",
|
if task.status.lower() not in [s.lower() for s in status_triggers]:
|
||||||
|
hint = mapping.get("trigger_hint", "manual trigger only")
|
||||||
|
log.info(
|
||||||
|
"Skipping task '%s' (type=%s): auto_execute is false (%s)",
|
||||||
task.name,
|
task.name,
|
||||||
task.task_type,
|
task.task_type,
|
||||||
|
hint,
|
||||||
)
|
)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -64,6 +64,7 @@ clickup:
|
||||||
"On Page Optimization":
|
"On Page Optimization":
|
||||||
tool: "create_content"
|
tool: "create_content"
|
||||||
auto_execute: false
|
auto_execute: false
|
||||||
|
trigger_hint: "content-cora-inbox file watcher"
|
||||||
required_fields: [keyword, url]
|
required_fields: [keyword, url]
|
||||||
field_mapping:
|
field_mapping:
|
||||||
url: "IMSURL"
|
url: "IMSURL"
|
||||||
|
|
@ -72,6 +73,8 @@ clickup:
|
||||||
"Content Creation":
|
"Content Creation":
|
||||||
tool: "create_content"
|
tool: "create_content"
|
||||||
auto_execute: false
|
auto_execute: false
|
||||||
|
auto_execute_on_status: ["outline approved"]
|
||||||
|
trigger_hint: "content-cora-inbox file watcher (Phase 1), outline approved status (Phase 2)"
|
||||||
field_mapping:
|
field_mapping:
|
||||||
url: "IMSURL"
|
url: "IMSURL"
|
||||||
keyword: "Keyword"
|
keyword: "Keyword"
|
||||||
|
|
@ -79,6 +82,7 @@ clickup:
|
||||||
"Link Building":
|
"Link Building":
|
||||||
tool: "run_link_building"
|
tool: "run_link_building"
|
||||||
auto_execute: false
|
auto_execute: false
|
||||||
|
trigger_hint: "cora-inbox file watcher"
|
||||||
complete_status: "complete"
|
complete_status: "complete"
|
||||||
error_status: "error"
|
error_status: "error"
|
||||||
field_mapping:
|
field_mapping:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue