Skip to content

Commit 83d2ee3

Browse files
authored
Merge pull request #108 from efedorov-dart/master
Fix threading error leading to boto3 S3 failures
2 parents 5144c4f + aa3d2b3 commit 83d2ee3

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

garcon/activity.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -537,12 +537,19 @@ def __init__(self, flow, activities=None):
537537
def run(self):
538538
"""Run the activities.
539539
"""
540-
540+
threads = []
541541
for activity in self.activities:
542542
if (self.worker_activities and
543543
activity.name not in self.worker_activities):
544544
continue
545-
threading.Thread(target=worker_runner, args=(activity,)).start()
545+
thread = threading.Thread(
546+
target=worker_runner,
547+
args=(activity,))
548+
thread.start()
549+
threads.append(thread)
550+
551+
for thread in threads:
552+
thread.join()
546553

547554

548555
class ActivityState:

0 commit comments

Comments
 (0)