Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

remove old clickhouse integration

Blue Mouse5d4f68fcf16a
diff --git a/apps/production/src/common/constants.ts b/apps/production/src/common/constants.ts
index d66e035f4..27089bd35 100644
--- a/apps/production/src/common/constants.ts
+++ b/apps/production/src/common/constants.ts
@@ -1,4 +1,3 @@
-import { ClickHouse } from 'clickhouse'
import Redis from 'ioredis'
import * as path from 'path'
import { hash } from 'blake3'
@@ -7,12 +6,8 @@ import * as _toNumber from 'lodash/toNumber'
// eslint-disable-next-line @typescript-eslint/no-var-requires
require('dotenv').config()
-const {
- CLICKHOUSE_DATABASE,
- PAYPAL_CLIENT_ID,
- PAYPAL_CLIENT_SECRET,
- EMAIL_ACTION_ENCRYPTION_KEY,
-} = process.env
+const { PAYPAL_CLIENT_ID, PAYPAL_CLIENT_SECRET, EMAIL_ACTION_ENCRYPTION_KEY } =
+ process.env
const redis = new Redis(
_toNumber(process.env.REDIS_PORT),
@@ -29,26 +24,6 @@ redis.defineCommand('countKeysByPattern', {
lua: "return #redis.call('keys', ARGV[1])",
})
-const clickhouse = new ClickHouse({
- url: process.env.CLICKHOUSE_HOST,
- port: _toNumber(process.env.CLICKHOUSE_PORT),
- debug: false,
- basicAuth: {
- username: process.env.CLICKHOUSE_USER,
- password: process.env.CLICKHOUSE_PASSWORD,
- },
- isUseGzip: false,
- format: 'json',
- raw: false,
- config: {
- session_timeout: 60,
- output_format_json_quote_64bit_integers: 0,
- enable_http_compression: 0,
- database: CLICKHOUSE_DATABASE,
- log_queries: 0,
- },
-})
-
const {
JWT_ACCESS_TOKEN_SECRET,
// 30 days
@@ -193,7 +168,6 @@ const NUMBER_JWT_ACCESS_TOKEN_LIFETIME = Number(JWT_ACCESS_TOKEN_LIFETIME)
const MAX_FUNNELS = 100
export {
- clickhouse,
redis,
isValidPID,
getRedisProjectKey,