Skip to content

Commit

Permalink
Do a random sleep between tasks when running as parallel pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
mariusmitrofan committed Jun 4, 2020
1 parent fddb527 commit e9c7699
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
@@ -1,6 +1,6 @@
FROM python:3.7-alpine

RUN pip install stackuchin==1.5.0
RUN pip install stackuchin==1.5.1

VOLUME /project

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -4,7 +4,7 @@

here = path.abspath(path.dirname(__file__))

current_version = str('1.5.0')
current_version = str('1.5.1')

# Get the long description from the README file
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
Expand Down
2 changes: 1 addition & 1 deletion src/stackuchin/__init__.py
Expand Up @@ -43,7 +43,7 @@ def __init__(self):

# noinspection PyMethodMayBeStatic
def version(self):
print("1.5.0")
print("1.5.1")

# noinspection PyMethodMayBeStatic
def create(self):
Expand Down
4 changes: 4 additions & 0 deletions src/stackuchin/start_pipeline.py
@@ -1,6 +1,8 @@
import yaml
import concurrent.futures
import boto3
import time
import random


from stackuchin.create import create
Expand All @@ -12,6 +14,8 @@


def perform_parallel_changes(stack):
time.sleep(random.randint(0, 30))

if stack['action'] == 'create':
return create(
stack['profile_name'],
Expand Down

0 comments on commit e9c7699

Please sign in to comment.