Skip to content

Instantly share code, notes, and snippets.

@xethorn
Last active September 11, 2015 21:59
Show Gist options
  • Save xethorn/f0799617bab540e70227 to your computer and use it in GitHub Desktop.
Save xethorn/f0799617bab540e70227 to your computer and use it in GitHub Desktop.
Garcon - Boto Example
from garcon import activity
from garcon import runner
domain = 'dev'
name = 'boto_tutorial'
create = activity.create(domain, name)
a_tasks = create(
name='a_tasks',
run=runner.Sync(
lambda context, activity: dict(result='Now don’t be givin him sambuca!'))
b_tasks = create(
name='b_tasks',
requires=[a_tasks],
run=runner.Sync(
lambda context, activity: print(context)))
c_tasks = create(
name='c_tasks',
requires=[b_tasks],
run=runner.Sync(
lambda context, activity: print(context)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment