|
9 | 9 | from typing import TYPE_CHECKING |
10 | 10 | from uuid import uuid4 |
11 | 11 |
|
12 | | -import boto.connection |
13 | 12 | import click |
14 | 13 | import multiprocess |
15 | 14 |
|
|
35 | 34 | from simpleflow.swf.mapper.models.workflow import WorkflowType |
36 | 35 |
|
37 | 36 |
|
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 | | - |
56 | 37 | def comma_separated_list(value): |
57 | 38 | """ |
58 | 39 | Transforms a comma-separated list into a list of strings. |
@@ -578,8 +559,6 @@ def standalone( |
578 | 559 | with a single main process. |
579 | 560 |
|
580 | 561 | """ |
581 | | - disable_boto_connection_pooling() |
582 | | - |
583 | 562 | if force_activities and not repair: |
584 | 563 | raise ValueError("You should only use --force-activities with --repair.") |
585 | 564 |
|
|
0 commit comments