Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
benjackwhite committed Sep 3, 2024
1 parent 9b6602a commit f396645
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion plugin-server/src/main/pluginsServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ import v8Profiler from 'v8-profiler-next'

import { getPluginServerCapabilities } from '../capabilities'
import { CdpApi } from '../cdp/cdp-api'
import { CdpCyclotronWorker, CdpFunctionCallbackConsumer, CdpProcessedEventsConsumer } from '../cdp/cdp-consumers'
import {
CdpCyclotronWorker,
CdpCyclotronWorkerFetch,
CdpFunctionCallbackConsumer,
CdpProcessedEventsConsumer,
} from '../cdp/cdp-consumers'
import { defaultConfig, sessionRecordingConsumerConfig } from '../config/config'
import { Hub, PluginServerCapabilities, PluginsServerConfig } from '../types'
import { createHub, createKafkaClient, createKafkaProducerWrapper } from '../utils/db/hub'
Expand Down Expand Up @@ -524,6 +529,12 @@ export async function startPluginsServer(
;[hub, closeHub] = hub ? [hub, closeHub] : await createHub(serverConfig, capabilities)
const worker = new CdpCyclotronWorker(hub)
await worker.start()

if (process.env.EXPERIMENTAL_CDP_FETCH_WORKER) {
const fetchWorker = new CdpCyclotronWorkerFetch(hub)
await fetchWorker.start()
}

shutdownCallbacks.push(async () => await worker.stop())
healthChecks['cdp-cyclotron-worker'] = () => worker.isHealthy() ?? false
}
Expand Down

0 comments on commit f396645

Please sign in to comment.