Configuration & secrets¶
All runtime settings load at import time from config/cfg.py through
fs_config.get_secret() and get_parameter(). The legacy bridge
pipes/__init__.py re-exports them as the SETTINGS dict.
Environment resolution¶
ENVIRONMENT=prd → _SVC_ENV=prd, _MYSQL_ENV=prd (default)
ENVIRONMENT=stg → _SVC_ENV=stg, _MYSQL_ENV=stg
ENVIRONMENT=local → _SVC_ENV=stg, _MYSQL_ENV=stg
(or _MYSQL_ENV=prd when LOCAL_PROD_DB=1)
The human-readable label exported as ENVIRONMENT is production, staging,
or local.
Primary settings¶
| Constant | Secret / parameter path |
|---|---|
MYSQL_SETTINGS |
/{mysql_env}/mysql/skynet-harvester |
VERTICALS_MYSQL_SETTINGS |
/{env}/mysql/verticals |
MYSQL_TIKTOK_* |
/{env}/mysql/tiktok |
S3_SETTINGS |
SSM /{env}/sources-harvester/s3 |
S3_WORDPRESS_SETTINGS |
SSM /{env}/sources-harvester/s3-wordpress |
REDIS_SETTINGS |
/{env}/shared/redis + SSM redis-db |
STG_REDIS_SETTINGS |
/stg/shared/redis db 6 (cross-env) |
RABBITMQ_SETTINGS |
/{env}/shared/rabbitmq |
APP_API_SETTINGS |
/{env}/sources-harvester/app-api |
DEALER_URL |
SSM /{env}/sources-harvester/urls |
DYNAMODB_SETTINGS |
/common/dynamodb |
REDSHIFT_SETTINGS |
/common/redshift |
SENDGRID_SETTINGS |
/common/sendgrid |
SLACK_MONITORING |
/common/slack-monitoring |
WORDPRESS_DB_SETTINGS |
/common/wordpress-db |
EXCHANGE_API_URL |
SSM /common/exchange-api/url |
TEMP_FILES_PATH |
Hardcoded /tmp/ |
Naming convention¶
- Cross-project, env-specific:
/<env>/<service>/(e.g./stg/shared/redis) - Project-specific:
/<env>/sources-harvester/<name> - Org-wide:
/common/<name>
Full tables live in README.md and the config/cfg.py module docstring.
Luigi scheduler¶
Luigi configuration files sit under config/luigi/. The scheduler daemon
(luigid) listens on http://localhost:8082 on harvest instances; the
watchdog polls it for stuck tasks.
Code references¶
| File | Role |
|---|---|
config/cfg.py |
Secret loading, ENVIRONMENT logic |
pipes/__init__.py |
SETTINGS backward-compat dict |
pipes/libs/model.py |
DB access helpers |
pipes/libs/mysql.py |
Connection pooling |