:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
feat(cdp): add cdp-cyclotron-worker-hogflow-legacy-pg server mode (#59190)
Meikel Ratz88fb2a2539dd
diff --git a/nodejs/src/capabilities.ts b/nodejs/src/capabilities.tsindex 9433c23d1823..c1849abb47aa 100644--- a/nodejs/src/capabilities.ts+++ b/nodejs/src/capabilities.ts@@ -124,6 +124,10 @@ export function getPluginServerCapabilities(return {cdpCyclotronWorkerHogFlow: true,}+ case PluginServerMode.cdp_cyclotron_worker_hogflow_legacy_pg:+ return {+ cdpCyclotronWorkerHogFlowLegacyPg: true,+ }case PluginServerMode.cdp_precalculated_filters:return {cdpPrecalculatedFilters: true,diff --git a/nodejs/src/common/config.ts b/nodejs/src/common/config.tsindex 40723cd0594c..fdc849f2942d 100644--- a/nodejs/src/common/config.ts+++ b/nodejs/src/common/config.ts@@ -25,6 +25,7 @@ export enum PluginServerMode {cdp_precalculated_filters = 'cdp-precalculated-filters',cdp_cohort_membership = 'cdp-cohort-membership',cdp_cyclotron_worker_hogflow = 'cdp-cyclotron-worker-hogflow',+ cdp_cyclotron_worker_hogflow_legacy_pg = 'cdp-cyclotron-worker-hogflow-legacy-pg',cdp_api = 'cdp-api',cdp_legacy_on_event = 'cdp-legacy-on-event',evaluation_scheduler = 'evaluation-scheduler',diff --git a/nodejs/src/server.ts b/nodejs/src/server.tsindex d3ce58c37220..217e0db28a68 100644--- a/nodejs/src/server.ts+++ b/nodejs/src/server.ts@@ -86,6 +86,7 @@ export class PluginServer implements NodeServer {capabilities.cdpApi ||capabilities.cdpCyclotronWorker ||capabilities.cdpCyclotronWorkerHogFlow ||+ capabilities.cdpCyclotronWorkerHogFlowLegacyPg ||capabilities.cdpPrecalculatedFilters ||capabilities.cdpCohortMembership ||capabilities.cdpBatchHogFlow@@ -225,6 +226,18 @@ export class PluginServer implements NodeServer {})}+ // Legacy postgres v1 drain for hogflow jobs — delete once cdp-cyclotron-worker-hogflows-pg-legacy is shut down+ if (capabilities.cdpCyclotronWorkerHogFlowLegacyPg) {+ serviceLoaders.push(async () => {+ const worker = new CdpCyclotronWorkerHogFlow(+ { ...this.config, CDP_CYCLOTRON_JOB_QUEUE_CONSUMER_MODE: 'postgres' },+ cdpDeps!+ )+ await worker.start()+ return worker.service+ })+ }+if (capabilities.cdpHogflowScheduler) {serviceLoaders.push(() => {const scheduler = new HogFlowScheduleService(this.config)diff --git a/nodejs/src/types.ts b/nodejs/src/types.tsindex bce19eccd5b4..3403158734bd 100644--- a/nodejs/src/types.ts+++ b/nodejs/src/types.ts@@ -166,6 +166,7 @@ export interface PluginServerCapabilities {cdpBatchHogFlow?: booleancdpCyclotronWorker?: booleancdpCyclotronWorkerHogFlow?: boolean+ cdpCyclotronWorkerHogFlowLegacyPg?: booleancdpPrecalculatedFilters?: booleancdpCohortMembership?: booleancdpApi?: boolean