mirror of
https://github.com/umami-software/umami.git
synced 2026-02-11 08:07:12 +01:00
Added rev_id column. Updated redis calls.
This commit is contained in:
parent
a9112f39ec
commit
3485b6268b
18 changed files with 133 additions and 79 deletions
|
|
@ -3,6 +3,7 @@ import { CLICKHOUSE, PRISMA, runQuery } from 'lib/db';
|
|||
import kafka from 'lib/kafka';
|
||||
import prisma from 'lib/prisma';
|
||||
import { uuid } from 'lib/crypto';
|
||||
import redis from 'lib/redis';
|
||||
|
||||
export async function saveEvent(...args) {
|
||||
return runQuery({
|
||||
|
|
@ -43,11 +44,13 @@ async function clickhouseQuery(
|
|||
{ session: { country, sessionUuid, ...sessionArgs }, eventUuid, url, eventName, eventData },
|
||||
) {
|
||||
const { getDateFormat, sendMessage } = kafka;
|
||||
const website = await redis.get(`website:${websiteId}`);
|
||||
|
||||
const params = {
|
||||
session_id: sessionUuid,
|
||||
event_id: eventUuid,
|
||||
website_id: websiteId,
|
||||
rev_id: website?.revId || 0,
|
||||
created_at: getDateFormat(new Date()),
|
||||
url: url?.substring(0, URL_LENGTH),
|
||||
event_name: eventName?.substring(0, EVENT_NAME_LENGTH),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue