Skip to content

Commit b120f39

Browse files
authored
Merge pull request #61 from ThinkOffApp/feat/log-resolved-self-handle
unified-poller: log resolved self handle at startup
2 parents 3c17ae3 + 6b7fb5e commit b120f39

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎src/unified-poller.mjs‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import { loadSeenIds, saveSeenIds } from './common/seen-ids.mjs';
44
import { nudgeTmux, writeNotification } from './common/notify.mjs';
55
import { appendEvents } from './common/event-queue.mjs';
6+
import { resolveSelfHandle } from './common/handles.mjs';
67
import { appendFileSync } from 'node:fs';
78

89
/**
@@ -124,6 +125,11 @@ export class UnifiedPoller {
124125
*/
125126
async start() {
126127
console.log(`${this.adapter.name} poller started`);
128+
// Print the RESOLVED self handle so a two-agent machine can spot a shared
129+
// IAK_SELF_HANDLE at a glance (review caveat on #59): if two pollers on
130+
// one host print the same handle here, one of them is filtering the
131+
// other's posts and the wrong agent goes deaf.
132+
console.log(` self handle: ${resolveSelfHandle({ config: this.config })} (own posts skipped, case-insensitive)`);
127133
console.log(` interval: ${this.interval}s`);
128134
console.log(` seen file: ${this.seenFile}`);
129135
console.log(` queue: ${this.queuePath}`);

0 commit comments

Comments
 (0)