We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 309ab2b commit a43b72bCopy full SHA for a43b72b
main.py
@@ -3,6 +3,19 @@
3
# SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
4
# SPDX-License-Identifier: AGPL-3.0-or-later
5
#
6
+
7
+import multiprocessing as mp
8
9
+# do forks from a clean process that doesn't have any threads or locks
10
+mp.set_start_method('forkserver')
11
+mp.set_forkserver_preload([
12
+ 'langchain',
13
+ 'sqlalchemy',
14
+ 'numpy',
15
+ 'context_chat_backend.chain.ingest.injest',
16
+ 'context_chat_backend.vectordb.pgvector',
17
+])
18
19
import logging
20
from os import cpu_count, getenv
21
0 commit comments