Created
July 25, 2014 21:36
-
-
Save caioiglesias/53813ee4f93717167270 to your computer and use it in GitHub Desktop.
Pipeline Dependents
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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