re org
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# Automation Module
|
||||
|
||||
**Last Verified:** January 3, 2026
|
||||
**Version:** 1.3.2
|
||||
**Last Verified:** January 17, 2026
|
||||
**Version:** 1.8.0
|
||||
**Status:** ✅ Active
|
||||
**Backend Path:** `backend/igny8_core/business/automation/`
|
||||
**Frontend Path:** `frontend/src/pages/Automation/`
|
||||
@@ -16,8 +16,12 @@
|
||||
| Service | `business/automation/services/automation_service.py` | `AutomationService` |
|
||||
| Logger | `business/automation/services/automation_logger.py` | `AutomationLogger` |
|
||||
| Celery Tasks | `business/automation/tasks.py` | `run_automation_task`, `check_scheduled_automations` |
|
||||
| Publishing Tasks | `igny8_core/tasks/publishing_scheduler.py` | Scheduled publishing (v1.3.2) |
|
||||
| Frontend | `pages/Automation/AutomationPage.tsx` | Main automation UI |
|
||||
| Publishing Tasks | `igny8_core/tasks/publishing_scheduler.py` | Scheduled publishing |
|
||||
| **Unified Settings** | `modules/integration/views/unified_settings.py` | **v1.8.0** Consolidated settings API |
|
||||
| Frontend Overview | `pages/Automation/AutomationOverview.tsx` | **v1.8.0** Run history dashboard |
|
||||
| Frontend Run Detail | `pages/Automation/AutomationRunDetail.tsx` | **v1.8.0** Detailed run view |
|
||||
| Frontend Manual Run | `pages/Automation/AutomationPage.tsx` | Manual run UI |
|
||||
| **Site Settings** | `pages/Sites/AIAutomationSettings.tsx` | **v1.8.0** Unified settings UI |
|
||||
| Progress Bar | `components/Automation/GlobalProgressBar.tsx` | Full pipeline progress |
|
||||
| Processing Card | `components/Automation/CurrentProcessingCard.tsx` | Real-time progress |
|
||||
|
||||
@@ -31,21 +35,23 @@ The Automation module runs the complete 7-stage content pipeline automatically:
|
||||
Keywords → Clusters → Ideas → Tasks → Content → Image Prompts → Images → Published
|
||||
```
|
||||
|
||||
**Settings Location (v1.8.0):** Site Settings → Automation tab
|
||||
|
||||
---
|
||||
|
||||
## 7-Stage Pipeline
|
||||
|
||||
| Stage | Name | AI Function | Credit Cost |
|
||||
|-------|------|-------------|-------------|
|
||||
| 1 | Keywords → Clusters | `AutoClusterFunction` | Per batch |
|
||||
| 2 | Clusters → Ideas | `GenerateIdeasFunction` | Per idea |
|
||||
| 3 | Ideas → Tasks | None (local) | None |
|
||||
| 4 | Tasks → Content | `GenerateContentFunction` | Per 100 words |
|
||||
| 5 | Content → Image Prompts | `GenerateImagePromptsFunction` | Per prompt |
|
||||
| 6 | Image Prompts → Images | `process_image_generation_queue` | Per image |
|
||||
| 7 | Review → Published | Publishing Scheduler (v1.3.2) | None |
|
||||
| Stage | Name | AI Function | Credit Cost | Can Skip |
|
||||
|-------|------|-------------|-------------|----------|
|
||||
| 1 | Keywords → Clusters | `AutoClusterFunction` | Per batch | ✅ |
|
||||
| 2 | Clusters → Ideas | `GenerateIdeasFunction` | Per idea | ✅ |
|
||||
| 3 | Ideas → Tasks | None (local) | None | ✅ |
|
||||
| 4 | Tasks → Content | `GenerateContentFunction` | Per 100 words | ✅ |
|
||||
| 5 | Content → Image Prompts | `GenerateImagePromptsFunction` | Per prompt | ✅ |
|
||||
| 6 | Image Prompts → Images | `process_image_generation_queue` | Per image | ✅ |
|
||||
| 7 | Review → Published | Publishing Scheduler | None | ✅ |
|
||||
|
||||
**Note:** Stage 7 uses the Publishing Scheduler with `PublishingSettings` to auto-approve and schedule content for publication. See [PUBLISHER.md](PUBLISHER.md) for details.
|
||||
**Note:** Stage 7 uses the Publishing Scheduler with `PublishingSettings` for auto-approval and scheduling.
|
||||
|
||||
---
|
||||
|
||||
@@ -58,7 +64,7 @@ Keywords → Clusters → Ideas → Tasks → Content → Image Prompts → Imag
|
||||
| account | FK | Owner account |
|
||||
| site | FK | Target site |
|
||||
| enabled | Boolean | Enable/disable automation |
|
||||
| frequency | CharField | daily/weekly/monthly |
|
||||
| frequency | CharField | hourly/daily/weekly |
|
||||
| scheduled_time | TimeField | Time to run |
|
||||
| stage_1_batch_size | Integer | Keywords per batch |
|
||||
| stage_2_batch_size | Integer | Clusters per batch |
|
||||
@@ -66,6 +72,19 @@ Keywords → Clusters → Ideas → Tasks → Content → Image Prompts → Imag
|
||||
| stage_4_batch_size | Integer | Tasks per batch |
|
||||
| stage_5_batch_size | Integer | Content per batch |
|
||||
| stage_6_batch_size | Integer | Images per batch |
|
||||
| **stage_1_enabled** | Boolean | **v1.8.0** Enable stage 1 |
|
||||
| **stage_2_enabled** | Boolean | **v1.8.0** Enable stage 2 |
|
||||
| **stage_3_enabled** | Boolean | **v1.8.0** Enable stage 3 |
|
||||
| **stage_4_enabled** | Boolean | **v1.8.0** Enable stage 4 |
|
||||
| **stage_5_enabled** | Boolean | **v1.8.0** Enable stage 5 |
|
||||
| **stage_6_enabled** | Boolean | **v1.8.0** Enable stage 6 |
|
||||
| **stage_7_enabled** | Boolean | **v1.8.0** Enable stage 7 |
|
||||
| **max_keywords_per_run** | Integer | **v1.8.0** Per-run limit stage 1 |
|
||||
| **max_clusters_per_run** | Integer | **v1.8.0** Per-run limit stage 2 |
|
||||
| **max_ideas_per_run** | Integer | **v1.8.0** Per-run limit stage 3 |
|
||||
| **max_tasks_per_run** | Integer | **v1.8.0** Per-run limit stage 4 |
|
||||
| **max_content_per_run** | Integer | **v1.8.0** Per-run limit stage 5 |
|
||||
| **max_images_per_run** | Integer | **v1.8.0** Per-run limit stage 6 |
|
||||
| within_stage_delay | Integer | Seconds between batches |
|
||||
| between_stage_delay | Integer | Seconds between stages |
|
||||
| last_run_at | DateTime | Last execution |
|
||||
@@ -234,6 +253,42 @@ For each stage (1-7):
|
||||
|
||||
---
|
||||
|
||||
## Settings Configuration (v1.8.0)
|
||||
|
||||
**Location:** Site Settings → Automation tab
|
||||
**API:** `GET/PATCH /api/v1/integration/sites/{site_id}/unified-settings/`
|
||||
|
||||
> ⚠️ **v1.8.0 Change:** Settings are now consolidated in Site Settings. The previous standalone `/automation/settings` page has been removed.
|
||||
|
||||
### Settings UI Sections
|
||||
|
||||
1. **Schedule & Frequency Card**
|
||||
- Enable/disable toggle
|
||||
- Frequency (hourly/daily/weekly)
|
||||
- Days of week selection
|
||||
- Time slot selection
|
||||
- Next run display
|
||||
|
||||
2. **Capacity Card**
|
||||
- Total items per run (calculated)
|
||||
- Stage-by-stage breakdown
|
||||
|
||||
3. **AI Configuration Card**
|
||||
- Testing model selection (is_testing=true)
|
||||
- Live model selection (is_testing=false)
|
||||
- Image model selection
|
||||
|
||||
4. **Stage Configuration (Matrix)**
|
||||
- Per-stage Enable/Disable toggle
|
||||
- Per-stage batch size
|
||||
- Per-stage max items per run (**new in v1.8.0**)
|
||||
|
||||
5. **Help Cards**
|
||||
- Pipeline flow visualization
|
||||
- Stage descriptions
|
||||
|
||||
---
|
||||
|
||||
## Scheduling
|
||||
|
||||
**Celery Beat Task:** `check_scheduled_automations`
|
||||
@@ -276,14 +331,30 @@ During execution:
|
||||
|
||||
## Frontend Integration
|
||||
|
||||
### AutomationPage Components
|
||||
### AutomationOverview (v1.8.0)
|
||||
|
||||
- **Config Panel:** Enable/disable, schedule settings
|
||||
**Path:** `/automation/overview`
|
||||
**Purpose:** Run history dashboard with:
|
||||
- All automation runs with status
|
||||
- Filter by status, date range
|
||||
- Click to view detailed run information
|
||||
|
||||
### AutomationRunDetail (v1.8.0)
|
||||
|
||||
**Path:** `/automation/runs/:runId`
|
||||
**Purpose:** Detailed view of individual run with:
|
||||
- Stage-by-stage progress
|
||||
- Items processed per stage
|
||||
- Errors and logs
|
||||
|
||||
### AutomationPage
|
||||
|
||||
**Path:** `/automation`
|
||||
**Purpose:** Manual run control with:
|
||||
- **Pipeline Cards:** Stage-by-stage status with pending counts
|
||||
- **Processing Card:** Live processing status during run
|
||||
- **Control Buttons:** Run Now, Pause, Resume, Cancel
|
||||
- **Activity Log:** Real-time log streaming
|
||||
- **History Table:** Past 20 runs with status
|
||||
|
||||
### Polling
|
||||
|
||||
@@ -305,11 +376,11 @@ During execution:
|
||||
|
||||
---
|
||||
|
||||
## Planned Changes
|
||||
## Changelog
|
||||
|
||||
| Feature | Status | Description |
|
||||
|---------|--------|-------------|
|
||||
| Progress bar accuracy | 🐛 Bug | Fix progress calculation based on actual stage |
|
||||
| Completed count display | 🐛 Bug | Fix count display in UI |
|
||||
| Stage skip configuration | 🔜 Planned | Allow skipping certain stages |
|
||||
| Notification on complete | 🔜 Planned | Email/webhook when done |
|
||||
| Version | Changes |
|
||||
|---------|---------|
|
||||
| v1.8.0 | Unified settings in Site Settings, per-run limits, skip stage functionality |
|
||||
| v1.7.0 | AutomationOverview dashboard, AutomationRunDetail page |
|
||||
| v1.3.2 | Stage 7 publishing scheduler integration |
|
||||
| v1.3.0 | Progress tracking with initial snapshots |
|
||||
|
||||
Reference in New Issue
Block a user