Skip to content

Commit 39f4aa7

Browse files
Merge pull request #1377 from datajoint/fix/multiprocess-no-tls
fix: Handle missing SSL context in multiprocess populate
2 parents 4f08923 + 8383315 commit 39f4aa7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/datajoint/autopopulate.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,8 @@ def handler(signum, frame):
525525
else:
526526
# spawn multiple processes
527527
self.connection.close()
528-
del self.connection._conn.ctx # SSLContext is not pickleable
528+
if hasattr(self.connection._conn, "ctx"):
529+
del self.connection._conn.ctx # SSLContext is not pickleable
529530
with (
530531
mp.Pool(processes, _initialize_populate, (self, self.jobs, populate_kwargs)) as pool,
531532
tqdm(desc="Processes: ", total=nkeys)

0 commit comments

Comments
 (0)