From e12d25677dcd5cc1888f51f5e95a6c28157b6822 Mon Sep 17 00:00:00 2001 From: Francis Cao Date: Fri, 12 Aug 2022 10:34:34 -0700 Subject: [PATCH] update kafka saves --- queries/analytics/event/saveEvent.js | 3 +-- queries/analytics/pageview/savePageView.js | 3 +-- queries/analytics/session/createSession.js | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/queries/analytics/event/saveEvent.js b/queries/analytics/event/saveEvent.js index cba480ea..0786042c 100644 --- a/queries/analytics/event/saveEvent.js +++ b/queries/analytics/event/saveEvent.js @@ -1,13 +1,12 @@ import { CLICKHOUSE, RELATIONAL, KAFKA, URL_LENGTH } from 'lib/constants'; import { getDateFormatClickhouse, - getDateFormatKafka, prisma, rawQueryClickhouse, runAnalyticsQuery, runQuery, - kafkaProducer, } from 'lib/db'; +import { kafkaProducer, getDateFormatKafka } from 'lib/kafka'; export async function saveEvent(...args) { return runAnalyticsQuery({ diff --git a/queries/analytics/pageview/savePageView.js b/queries/analytics/pageview/savePageView.js index d87e4eaa..0dd93b44 100644 --- a/queries/analytics/pageview/savePageView.js +++ b/queries/analytics/pageview/savePageView.js @@ -1,13 +1,12 @@ import { CLICKHOUSE, RELATIONAL, KAFKA, URL_LENGTH } from 'lib/constants'; import { getDateFormatClickhouse, - getDateFormatKafka, prisma, rawQueryClickhouse, runAnalyticsQuery, runQuery, - kafkaProducer, } from 'lib/db'; +import { kafkaProducer, getDateFormatKafka } from 'lib/kafka'; export async function savePageView(...args) { return runAnalyticsQuery({ diff --git a/queries/analytics/session/createSession.js b/queries/analytics/session/createSession.js index 3c59cdcb..5c4b982c 100644 --- a/queries/analytics/session/createSession.js +++ b/queries/analytics/session/createSession.js @@ -1,13 +1,12 @@ import { CLICKHOUSE, RELATIONAL, KAFKA } from 'lib/constants'; import { getDateFormatClickhouse, - getDateFormatKafka, prisma, rawQueryClickhouse, runAnalyticsQuery, runQuery, - kafkaProducer, } from 'lib/db'; +import { kafkaProducer, getDateFormatKafka } from 'lib/kafka'; import { getSessionByUuid } from 'queries'; export async function createSession(...args) {