- Task monitoring - execution tracking, performance metrics, health status
- Enhanced error handling - better logging, retry logic, timeout support
- LocalStack support - local development without AWS costs
- Configuration validation - task definition validation and suggestions
- Health checks - system and dependency health monitoring
npm install
npm run setup:localstack
npm run local
npm startAll existing JSON task files work unchanged:
api2.json- API server taskscoins.json- Coin data tasksdimensions.json- Dimension tasksstablecoin.json- Stablecoin taskstvl-dev.json- TVL development tasks
Tasks can now include optional enhancement fields:
{
"tasks": {
"enhanced-task": {
"schedule": "*/5 * * * *",
"bash_script": ["long-running-command"],
"timeout": 300000,
"retry_on_failure": true,
"max_retries": 3,
"retry_delay": 60000
}
}
}sudo usermod -aG docker $USER && newgrp dockersudo systemctl start docker- Start LocalStack:
npm run localstack:setup - Setup tables:
npm run localstack:start - Run locally:
npm run local
NODE_ENV=local- Enables LocalStack modeUSE_LOCALSTACK=true- Forces LocalStack usageLOCALSTACK_ENDPOINT- LocalStack endpoint (default: http://localhost:4566)TASK_FILE- Task configuration file (default: api2.json)
npm run healthlogs/task-monitor.log- Task execution eventslogs/health-report.json- Latest health statuslogs/task-stats-final.json- Final stats on shutdown
- Task execution times and success rates
- Error tracking and failure analysis
- System health and dependency status
- Active execution tracking
npm test
npm run test:watchOptionally enhance existing tasks:
// Before (still works)
{
"schedule": "*/30 * * * *",
"bash_script": ["git pull", "npm run build"]
}
// After (enhanced)
{
"schedule": "*/30 * * * *",
"bash_script": ["git pull", "npm run build"],
"timeout": 600000,
"retry_on_failure": true,
"max_retries": 2
}app.js- Main application with hot-reloadingaws.js- DynamoDB secrets management- Task JSON files - Configuration definitions
task-monitor.jstask-executor.js- with timeout/retryconfig-validator.jshealth-check.jssetup-localstack.js
NODE_ENV=local npm startNODE_ENV=production npm start