Skip to content

Commit

Permalink
bump: clickhouse-client 1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
0xsign committed Apr 22, 2024
1 parent 52a753b commit 88e45e3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"@aws-sdk/client-dynamodb": "^3.540.0",
"@aws-sdk/client-lambda": "^3.398.0",
"@aws-sdk/lib-dynamodb": "^3.540.0",
"@clickhouse/client": "^0.2.10",
"@clickhouse/client": "^1.0.1",
"@llamafolio/tokens": "^0.1.108",
"@slack/web-api": "^7.0.1",
"dayjs": "^1.11.9",
Expand Down
14 changes: 7 additions & 7 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions src/db/clickhouse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ import environment from '@environment'

// Initialize client outside of Lambda handlers to reuse TCP/IP connection
export const client = createClient({
host: environment.CLICKHOUSE_HOST || 'http://localhost:8123',
url: environment.CLICKHOUSE_HOST || 'http://localhost:8123',
username: environment.CLICKHOUSE_USER || 'default',
password: environment.CLICKHOUSE_PASSWORD || '',
keep_alive: {
enabled: true,
socket_ttl: 2500,
retry_on_expired_socket: true,
idle_socket_ttl: 2500,
},
clickhouse_settings: {
max_threads: 16,
Expand Down

0 comments on commit 88e45e3

Please sign in to comment.