fix: use node http for cron scheduler + add toast notifications
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 40s
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 40s
- Replace wget with node http.request in entrypoint (guaranteed available, better error handling) - Add 30s polling in agents page to detect new agent executions - Show toast notification when an agent finishes (success or failure) - Add logging in scheduler for visibility in docker logs Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -8,7 +8,16 @@ node ./node_modules/prisma/build/index.js migrate deploy
|
||||
(
|
||||
sleep 60
|
||||
while true; do
|
||||
wget -q -O /dev/null --post-data='' "http://localhost:3000/api/cron/agents" 2>/dev/null || true
|
||||
node -e "
|
||||
const http = require('http');
|
||||
const req = http.request('http://localhost:3000/api/cron/agents', { method: 'POST' }, (res) => {
|
||||
let body = '';
|
||||
res.on('data', (d) => body += d);
|
||||
res.on('end', () => console.log('[Scheduler] Cron response:', res.statusCode, body));
|
||||
});
|
||||
req.on('error', (e) => console.error('[Scheduler] Cron error:', e.message));
|
||||
req.end();
|
||||
" 2>&1 || true
|
||||
sleep 300
|
||||
done
|
||||
) &
|
||||
|
||||
Reference in New Issue
Block a user