(taskQueue: string)
| 75 | * Log heartbeat only to dedicated file, not to console |
| 76 | */ |
| 77 | export function logHeartbeat(taskQueue: string) { |
| 78 | const entry = { |
| 79 | timestamp: new Date().toISOString(), |
| 80 | taskQueue, |
| 81 | }; |
| 82 | |
| 83 | try { |
| 84 | fs.appendFileSync(HEARTBEAT_LOG_FILE, JSON.stringify(entry) + '\n'); |
| 85 | } catch (_err) { |
| 86 | // Silently fail |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | /** |
| 91 | * Get recent logs from debug file |