19 lines
617 B
JavaScript
19 lines
617 B
JavaScript
#!/usr/bin/env node
|
|
|
|
const intervalSeconds = Number(process.env.VIBEWORK_NOTIFICATION_DELIVERY_INTERVAL_SECONDS || "300");
|
|
const intervalMs = Math.max(1_000, intervalSeconds * 1000);
|
|
|
|
console.log(`[notification-delivery-worker] start interval_seconds=${intervalSeconds}`);
|
|
|
|
setInterval(async () => {
|
|
try {
|
|
// Stage-1: this worker keeps process alive to avoid restart loops in production mode.
|
|
console.log(
|
|
`[notification-delivery-worker] heartbeat ${new Date().toISOString()}`
|
|
);
|
|
} catch (error) {
|
|
console.error("[notification-delivery-worker] heartbeat error", error);
|
|
}
|
|
}, intervalMs);
|
|
|