I'm trying to using taskqueues in Google App Engine. I have something like
class TrackBuildHandler(webapp.RequestHandler):
def post(self):
track_name = self.request.get('track_name')
taskqueue.add(url='/runbuild/track', params={'track_name': track_name})
class TrackBuildWorker(webapp.RequestHandler):
def post(self):
...
class SomeClass(webapp.RequestHandler):
def post(self):
...
taskqueue.add(url='/runbuild/track', params={'track_name': track_name})
From what I gather you can't call this command from two different places in your code because if I remove the TrackBuildHandler class the call from SomeClass works but otherwise only TrackBuildHandler works. How would I go about posting data to TrackBuildHandler from SomeClass or is there a better way to do this? Thanks.
EDIT: I should note that the url '/runbuild/track' is routed to TrackBuildWorker.