Skip to content

Instantly share code, notes, and snippets.

@amacal
Created November 21, 2020 08:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amacal/42680b81c31d42caa4b2d15884c6b386 to your computer and use it in GitHub Desktop.
Save amacal/42680b81c31d42caa4b2d15884c6b386 to your computer and use it in GitHub Desktop.
def master(filename, bucket, cluster, task, securityGroup, vpcSubnet, queue):
pipeline = Pipeline(name=filename, steps=[
EcsTask(cluster=cluster, task=task, securityGroup=securityGroup, vpcSubnet=vpcSubnet, queue=queue, environment=lambda token: [
{ 'name': 'TYPE', 'value': 'worker' },
{ 'name': 'FILENAME', 'value': filename },
{ 'name': 'BUCKET', 'value': bucket },
{ 'name': 'HOST', 'value': token['Host'] },
{ 'name': 'DIRECTORY', 'value': token['Directory'] },
])
])
pipeline.start(input=filename)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment