update kafka saves

This commit is contained in:
Francis Cao 2022-08-12 10:34:34 -07:00
parent 192dd218cb
commit e12d25677d
3 changed files with 3 additions and 6 deletions

View File

@ -1,13 +1,12 @@
import { CLICKHOUSE, RELATIONAL, KAFKA, URL_LENGTH } from 'lib/constants'; import { CLICKHOUSE, RELATIONAL, KAFKA, URL_LENGTH } from 'lib/constants';
import { import {
getDateFormatClickhouse, getDateFormatClickhouse,
getDateFormatKafka,
prisma, prisma,
rawQueryClickhouse, rawQueryClickhouse,
runAnalyticsQuery, runAnalyticsQuery,
runQuery, runQuery,
kafkaProducer,
} from 'lib/db'; } from 'lib/db';
import { kafkaProducer, getDateFormatKafka } from 'lib/kafka';
export async function saveEvent(...args) { export async function saveEvent(...args) {
return runAnalyticsQuery({ return runAnalyticsQuery({

View File

@ -1,13 +1,12 @@
import { CLICKHOUSE, RELATIONAL, KAFKA, URL_LENGTH } from 'lib/constants'; import { CLICKHOUSE, RELATIONAL, KAFKA, URL_LENGTH } from 'lib/constants';
import { import {
getDateFormatClickhouse, getDateFormatClickhouse,
getDateFormatKafka,
prisma, prisma,
rawQueryClickhouse, rawQueryClickhouse,
runAnalyticsQuery, runAnalyticsQuery,
runQuery, runQuery,
kafkaProducer,
} from 'lib/db'; } from 'lib/db';
import { kafkaProducer, getDateFormatKafka } from 'lib/kafka';
export async function savePageView(...args) { export async function savePageView(...args) {
return runAnalyticsQuery({ return runAnalyticsQuery({

View File

@ -1,13 +1,12 @@
import { CLICKHOUSE, RELATIONAL, KAFKA } from 'lib/constants'; import { CLICKHOUSE, RELATIONAL, KAFKA } from 'lib/constants';
import { import {
getDateFormatClickhouse, getDateFormatClickhouse,
getDateFormatKafka,
prisma, prisma,
rawQueryClickhouse, rawQueryClickhouse,
runAnalyticsQuery, runAnalyticsQuery,
runQuery, runQuery,
kafkaProducer,
} from 'lib/db'; } from 'lib/db';
import { kafkaProducer, getDateFormatKafka } from 'lib/kafka';
import { getSessionByUuid } from 'queries'; import { getSessionByUuid } from 'queries';
export async function createSession(...args) { export async function createSession(...args) {