Changed from continuous loop to single-run mode: - Processes ONLY the first A1 campaign found - Exits after processing (success=0, failure=1) - Cron will run every 5 minutes, naturally processing one at a time Benefits: ✅ Controlled processing (one campaign at a time) ✅ Easy to test manually ✅ Predictable resource usage ✅ Failed campaigns retry on next run ✅ Can stop/start easily How it works: 1. Cron triggers script every 5 minutes 2. Script finds A1 campaigns 3. Processes first one only 4. If success → Updates to A2, exits 5. If failure → Stays A1, exits 6. Next run processes next A1 (or retries failed) Also fixed requirements.txt to use >= versions for Python 3.10+ compatibility 🤖 Generated with Claude Code
36 lines
596 B
Text
36 lines
596 B
Text
# Ferrero Content Scaling - Python Automation Dependencies
|
|
# Compatible with Python 3.6+ (server) and Python 3.10+ (local)
|
|
|
|
# Core HTTP and utilities
|
|
requests>=2.27.0
|
|
python-dotenv>=0.19.0
|
|
PyYAML>=5.4
|
|
python-dateutil>=2.8.0
|
|
|
|
# Database
|
|
psycopg2-binary>=2.8.0
|
|
|
|
# Box SDK
|
|
boxsdk>=2.14.0
|
|
|
|
# Web Framework for webhook receiver
|
|
Flask>=2.0.0
|
|
Werkzeug>=2.0.0
|
|
|
|
# JWT handling (for Box authentication)
|
|
PyJWT>=2.3.0
|
|
cryptography>=3.4.0
|
|
|
|
# Email templates
|
|
Jinja2>=3.0.0
|
|
|
|
# Retry logic
|
|
tenacity>=8.0.0
|
|
|
|
# Testing
|
|
pytest>=6.2.0
|
|
pytest-cov>=3.0.0
|
|
pytest-mock>=3.6.0
|
|
|
|
# HTTP mocking for tests
|
|
responses>=0.18.0
|