skynet-sources-harvester¶
Luigi-based data pipelines that sync provider costs, campaigns, creatives, DFP / Google Ad Manager reports, revenue, verticals content, and AI content actions into Skynet's MySQL, S3, and Redshift stores.
The harvester runs on dedicated EC2 instances (harvest-05, harvest-07,
harvest-08) under cron, with luigid scheduling and a health watchdog
that reports to CloudWatch.
What it does¶
| Area | Examples |
|---|---|
| Provider sync | Cost, revenue, campaigns, creatives, accounts, keywords |
| DFP / Ad Manager | Hourly reports, key-value, header bidder, ad units, orders |
| AI content | WordPress publish, homepage generation, image steps, training sync |
| Verticals | AI patterns, mail, DynamoDB exports |
| Alerts | DB/mail/SMS/Slack executors driven by cron_settings rows |
| ML | Training and prediction wrappers (ADX UV models) |
Stack¶
- Python 3.8 on EC2 (local venv at
env/or/srv/skynet-sources-harvester/env/) - Luigi 3.x task scheduler (
python -m luigi) - AWS Secrets Manager for all runtime config (
config/cfg.pyviafs_config) - MySQL (primary + verticals + tiktok), Redis, RabbitMQ, S3
Documentation map¶
| Page | What it covers |
|---|---|
| Setup | Prerequisites, venv, AWS credentials — no Docker |
| Configuration & secrets | ENVIRONMENT, secret paths, LOCAL_PROD_DB |
| Running tasks | Luigi CLI, execute*.sh, cron layout |
| Task catalog | Module → wrapper class index by family |
| Testing & debugging | pytest, log levels, common breakpoints |
| Health watchdog | CPU spike/stall/stuck detection (AISD-121) |
Task lineage¶
- AISD-131 — org-wide documentation portal at docs.skyneto.com
- AISD-120 — Taboola campaign sync parallelism
- AISD-121 — harvester health watchdog + CloudWatch sink
Build these docs locally¶
cd skynet-sources-harvester
python3.8 -m venv .venv_docs && source .venv_docs/bin/activate
pip install -r requirements-docs.txt
mkdocs build --strict
mkdocs serve # http://127.0.0.1:8000/