Barazo AppView backend barazo.forum

fix(firehose): do not await channel.start() during app startup

channel.start() is a long-running for-await loop that never resolves.
Awaiting it blocked the Fastify onReady hook, causing integration test
timeouts in CI where no Tap service is provisioned.

Fixes the recurring Integration Tests CI failure.

authored by

Guido X Jansen and committed by
GitHub
545b5504 59fec188

+9 -1
+9 -1
src/firehose/service.ts
··· 99 99 }) 100 100 101 101 this.channel = this.tap.channel(indexer) 102 - await this.channel.start() 102 + 103 + // channel.start() is a long-running loop over WebSocket messages that 104 + // only resolves when the channel is destroyed. Run it as a background 105 + // task so it does not block the Fastify onReady hook. 106 + this.channel.start().catch((err: unknown) => { 107 + this.logger.error({ err }, 'Firehose channel error') 108 + this.connected = false 109 + }) 110 + 103 111 this.connected = true 104 112 this.logger.info('Firehose subscription started') 105 113 } catch (err) {