Skip to content

Instantly share code, notes, and snippets.

@matt-baker
Last active December 15, 2016 02:50
Show Gist options
  • Save matt-baker/322931459dca30af16dd719d33b0baa8 to your computer and use it in GitHub Desktop.
Save matt-baker/322931459dca30af16dd719d33b0baa8 to your computer and use it in GitHub Desktop.
#!/usr/local/bin/python
"""
Example Python script for parallel processing with Docker containers
"""
from os import environ
if __name__ == "__main__":
action = environ.get('action') # Will be passed in via Docker -e environment variable
if action == 'etl':
pass # Run ETL
elif action == 'analysis':
pass # Run analysis
else:
print('Action not supported')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment