Skip to content

Romsick/hello_world_garcon

 
 

Repository files navigation

Hello Garcon

A simple intro Garcon workflow.

Installation

Dependencies

  • python 3.4

Set up a virtual Python environment

$ pyvenv ./env
$ source ./env/bin/activate
$ pip install -r requirements.txt

Set up environment variables

.env.shadow is a template environment variable script that exports keys and values necessary for the app. You will need to copy this file to .env and populate the necessary keys.

$ cp .env.shadow .env
$ vim .env
$ source .env

Running a Garcon Workflow

In seperate terminals run a Decider & a Worker

(don't forget to activate the virtualenv and set the required .env variables first in each terminal)

Garcon Worker

$ source env/bin/activate
$ source .env
$ python ./run_worker.py 

Garcon Decider

$ source env/bin/activate
$ source .env
$ python ./run_decider.py 

Once a Decider & Worker are running, open another terminal & execute a workflow.

Execute SWF flow

$ source env/bin/activate
$ source .env
$ python ./execute_workflow.py 

After executing python ./execute_workflow.py, a SWF flow will be visible in the AWS console. Once the Decider & Worker pick up the workflow request from AWS, they will begin printing to standard output in their terminals.

Troubleshooting

  • When a Decider / Worker is killed and restarted in the middle of the polling AWS, there is a risk for the next 70 seconds that AWS will mistakenly send a Decider/Worker action to the old, dead daemon see here. If it takes longer than a minute for a workflow to begin executing, kill the work flow via the AWS console.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%