Deploy & cron¶
CodeDeploy flow¶
appspec.yml triggers scripts/after_install, which:
- Creates Python 3.12 venv at
/srv/tasks-scheduler/env/ pip install -r requirements.txt(includesfs_configfrom GitHub)- Writes
/srv/tasks-scheduler/.envwithENVIRONMENT=stg|prdfrom$DEPLOYMENT_GROUP_NAME
execute.sh¶
Cron and operators invoke Luigi through the wrapper:
/srv/tasks-scheduler/execute.sh <module> <TaskClass> <workers>
Example (staging news_fetch):
/srv/tasks-scheduler/execute.sh pipes.tasks.alerts.news_fetch NewsFetchScheduler 1
The script:
cd /srv/tasks-scheduler- Sources
.envif present - Runs
PYTHONPATH=$SKYNETPATH env/bin/python -m luigi --module …
execute_gen_python.sh¶
For non-Luigi scripts (e.g. series_uploader_google_sheets.py):
/srv/tasks-scheduler/execute_gen_python.sh pipes/tasks/series_uploader_google_sheets.py
Crontab¶
Schedules live under crontab/:
| File | Purpose |
|---|---|
stage-crons.txt |
Staging tasks-scheduler entries |
prd-harvest-05-sources.txt |
Mixed references (mostly harvester) |
Verify the active news_fetch line before editing production cron.
Luigi daemon (optional)¶
config/luigi/server/luigi.cfg + luigid.service configure a central scheduler
on port 8082. Local laptop runs typically use --local-scheduler instead.
Docs publish¶
After merging this package, hq/infrastructure/docs-site/build-and-deploy.sh
builds the MkDocs site to https://docs.skyneto.com/tasks-scheduler/.