mirror of
https://github.com/larchanka/manbot.git
synced 2026-05-13 21:42:08 +00:00
chore: filter out system heartbeats from intelligence pipeline logs
This commit is contained in:
committed by
Mikhail Larchanka
parent
54bc04922f
commit
6d3c6f3e21
@@ -252,7 +252,7 @@ export class DashboardService extends BaseProcess {
|
||||
if (fs.existsSync(logPath)) {
|
||||
stats.logs = fs.readFileSync(logPath, 'utf8').trim().split('\n').map(line => {
|
||||
try { return JSON.parse(line); } catch (e) { return { message: line }; }
|
||||
}).reverse();
|
||||
}).filter((l: any) => l.type !== "event.system.heartbeat").reverse();
|
||||
}
|
||||
} catch (e) { }
|
||||
return stats;
|
||||
|
||||
@@ -57,7 +57,7 @@ export class LoggerService extends BaseProcess {
|
||||
}
|
||||
|
||||
protected override handleEnvelope(envelope: Envelope): void {
|
||||
if (!envelope.type.startsWith("event.")) {
|
||||
if (!envelope.type.startsWith("event.") || envelope.type === "event.system.heartbeat") {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user