Engine operations
PM2 lifecycle, heartbeat, cycles, and restart verification.
#Process
overweight-engine runs npm run engine under /var/www/overweight. The interval defaults to 30 seconds and cannot be configured below 15 seconds.
#Commands
pm2 status overweight-engine
pm2 logs overweight-engine --lines 200
pm2 restart overweight-engine
pm2 describe overweight-engine#Verification
Observe at least two successful source-timestamp changes and increasing unique counts. Restart the worker and confirm counts remain and heartbeat worker_started_at changes.
#Lease
If logs report another active lease owner, verify PM2 instance count and wait for expiry or stop the duplicate process. Do not delete the lock row while a worker is active.