Skip to content

Instantly share code, notes, and snippets.

@caioiglesias
Created July 25, 2014 21:36
Show Gist options
  • Save caioiglesias/53813ee4f93717167270 to your computer and use it in GitHub Desktop.
Save caioiglesias/53813ee4f93717167270 to your computer and use it in GitHub Desktop.
Pipeline Dependents
class EnterTheCar(base_handler.PipelineBase):
def run(self, kid1, kid2):
return "%s %s" % (kid1, kid2)
class Child(base_handler.PipelineBase):
def run(self):
return 'Are we there yet?'
class Father(base_handler.PipelineBase):
def run(self):
bob = yield Child()
kyle = yield Child()
yield EnterTheCar(bob, kyle)
class MainHandler(webapp2.RequestHandler):
def get(self):
incoming = Father()
incoming.start()
path = incoming.base_path + "/status?root=" + incoming.pipeline_id
self.redirect(path)
app = webapp2.WSGIApplication([
('/', MainHandler)
], debug=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment