aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-node/src/meshbay_node/indexer/indexer.py
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-08-22 16:40:54 +0200
committerChristophe Besson <cbesson@gmail.com>2026-08-22 16:40:54 +0200
commit9c136a0e37add42f5d0c8675a797969cfe690de0 (patch)
treed5dfd3a7e2289a769dc987f086eec3f475054f85 /packages/meshbay-node/src/meshbay_node/indexer/indexer.py
parent2dbd70484e65ae57e18c323381136077cd00adad (diff)
downloadmeshbay-9c136a0e37add42f5d0c8675a797969cfe690de0.tar.gz
fix: first-run wizard reliability and node startup performance
Node daemon no longer blocks startup on slow directory scans — initial indexing runs in the background so the node reaches "running" immediately after transports are up. Fixes the wizard failing to detect the node when large USB/NAS roots take minutes to scan. Also: wizard key-linking deadlock resolved (main.js links during poll), invite form stays in DOM during reconnects (disabled instead of destroyed), pairing code bridges to renderer, and firewall docs for LAN casting added. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-node/src/meshbay_node/indexer/indexer.py')
-rw-r--r--packages/meshbay-node/src/meshbay_node/indexer/indexer.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/packages/meshbay-node/src/meshbay_node/indexer/indexer.py b/packages/meshbay-node/src/meshbay_node/indexer/indexer.py
index d9b1d2c..482b556 100644
--- a/packages/meshbay-node/src/meshbay_node/indexer/indexer.py
+++ b/packages/meshbay-node/src/meshbay_node/indexer/indexer.py
@@ -240,10 +240,16 @@ class DirectoryIndexer:
# ── Watchdog integration ──────────────────────────────────────────────────
- async def start(self) -> None:
- """Start initial scan + filesystem watcher + reconciler."""
+ async def start(self, *, defer_scan: bool = False) -> None:
+ """Start initial scan + filesystem watcher + reconciler.
+
+ With ``defer_scan=True`` the watcher and reconciler start
+ immediately but the initial scan is skipped — call
+ :meth:`initial_scan` yourself when ready.
+ """
self._loop = asyncio.get_event_loop()
- await self.initial_scan()
+ if not defer_scan:
+ await self.initial_scan()
self._start_observer()
self._reconciler = asyncio.create_task(self._reconcile_loop())