Skip to content

Commit

Permalink
vert "Vercel loc test, commit"
Browse files Browse the repository at this point in the history
This reverts commit d3ddc44.
  • Loading branch information
vigneshshettyin committed Jun 2, 2024
1 parent d3ddc44 commit 055a408
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 22 deletions.
6 changes: 2 additions & 4 deletions kafka/fixtures/kafka_consumer.sql
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,10 @@ CREATE TABLE click_analytics (
`device` LowCardinality(String),
`country` LowCardinality(String),
`region` String,
`city` String,
`timestamp` Date DEFAULT toDate(now())
`city` String
)
ENGINE = MergeTree()
PARTITION BY toYYYYMM(timestamp)
ORDER BY (code, timestamp, browser, os, device, country);
ORDER BY (code, browser, os, device, country);

-- Create a Materialized View named 'click_analytics_consumer' to transfer data from the Kafka table to the ClickHouse table
-- The view selects all columns from 'eurl_kafka' and inserts them into the 'click_analytics' table
Expand Down
20 changes: 2 additions & 18 deletions lib/services/redisPublicGenerate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,24 +48,8 @@ const checkIfShortCodePublic = (shortCode: string): boolean => {

const publishUserAgent = async (req: NextRequest, code: string) => {
const userAgent = userAgentAnlytics(req);
const tmp_test_data = {
city : req.geo!.city,
country : req.geo!.country,
region : req.geo!.region,
lat : req.geo!.latitude,
long :req.geo!.longitude
}

await pubSubRedis.lpush(
"user_location",
JSON.stringify({
code,
...tmp_test_data,
})
);

await pubSubRedis.lpush(
"user_analytics",
await pubSubRedis.publish(
"user_anlytics",
JSON.stringify({
code,
...userAgent,
Expand Down

0 comments on commit 055a408

Please sign in to comment.