Skip to content

Commit a890ea1

Browse files
clarify/elaborate
1 parent a787ab3 commit a890ea1

File tree

1 file changed

+1
-1
lines changed
  • docs/integrations/language-clients/python

1 file changed

+1
-1
lines changed

docs/integrations/language-clients/python/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ See [Managing ClickHouse Session IDs](#managing-clickhouse-session-ids) for more
428428

429429
##### Worker pools and task queues {#worker-pools-and-task-queues}
430430

431-
For Celery, RQ, or similar task queue systems, create one client per worker process:
431+
For Celery, RQ, and similar task-queue systems that run multiple worker processes, initialize exactly one ClickHouse client per worker process and reuse it for all tasks handled by that process. Do not share clients across processes. Prefer creating the client on worker-process start and closing it on shutdown; avoid per-task creation. Set sensible connection/read timeouts and, if you expect concurrent queries, either create multiple clients per process or configure the client’s HTTP connection pool accordingly. If the worker model also uses threads, don’t share a single session across concurrent queries.
432432

433433
```python
434434
# Celery example

0 commit comments

Comments
 (0)