Skip to content

Commit b2447df

Browse files
committed
Remove dubious patch for boto2 + multiprocessing (RISKY!)
1 parent f50c00c commit b2447df

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

simpleflow/command.py

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
from typing import TYPE_CHECKING
1010
from uuid import uuid4
1111

12-
import boto.connection
1312
import click
1413
import multiprocess
1514

@@ -35,24 +34,6 @@
3534
from simpleflow.swf.mapper.models.workflow import WorkflowType
3635

3736

38-
def disable_boto_connection_pooling():
39-
# boto connection pooling doesn't work very well with multiprocessing, it
40-
# provokes some errors like this:
41-
#
42-
# [Errno 1] _ssl.c:1429: error:1408F119:SSL routines:SSL3_GET_RECORD:decryption failed or bad record mac
43-
# when polling on analysis-testjbb-repair-a61ff96e854344748e308fefc9ddff61
44-
#
45-
# It's because when forking, file handles are copied and sockets are shared.
46-
# Even sockets that handle SSL conections to AWS services, but SSL
47-
# connections are stateful! So with multiple workers, it collides.
48-
#
49-
# To disable boto's connection pooling (which in practice makes boto open a
50-
# *NEW* connection for each call), we make make boto believe we run on
51-
# Google App Engine, where it disables connection pooling. There's no
52-
# "direct" setting, so that's a hack but that works.
53-
boto.connection.ON_APP_ENGINE = True
54-
55-
5637
def comma_separated_list(value):
5738
"""
5839
Transforms a comma-separated list into a list of strings.
@@ -578,8 +559,6 @@ def standalone(
578559
with a single main process.
579560
580561
"""
581-
disable_boto_connection_pooling()
582-
583562
if force_activities and not repair:
584563
raise ValueError("You should only use --force-activities with --repair.")
585564

0 commit comments

Comments
 (0)