0

I have a dispatch.yaml file that is supposed to route deferred Task Queue requests on the /_ah/queue/deferred path to a module instance with more memory. However, the requests are not consistently being routed.

See this doc page for a primer on deferred tasks (they are a sub-type of task queue tasks).

Here is my dispatch.yaml:

dispatch:
- url: "*/_ah/queue/deferred"
  module: deferred

- url: "*/cron/*"
  module: deferred

- url: "*/ocr/cron/*"
  module: deferred

The problem is that while the above dispatch file seems to work most of the time, it does not work all of the time. That is, sometimes requests on the /_ah/queue/deferred get routed to the default module instead of the deferred module.

Screenshots

Here is a screenshot of my logs on the "deferred" module. Notice that the URLs to the deferred path get properly dispatched:

Image of Deferred Module


But here is the screenshot of the default module's logs. Notice that it too is getting this path routed to it: Image of Default Module

speedplane
  • 15,673
  • 16
  • 86
  • 138
  • https://cloud.google.com/appengine/docs/python/config/appconfig#Python_app_yaml_Reserved_URLs – HayatoY May 13 '15 at 08:35
  • Thanks, but that says the `/_ah/` URLs are reserved for handlers. It says nothing about dispatching. You should be able to dispatch task queues to specific modules. – speedplane May 13 '15 at 15:04

1 Answers1

2

I guess you forgot to add target?

deferred.defer(dosomething, _target="deferred")

More info https://cloud.google.com/appengine/docs/python/config/queue#target

Related question GAE backend instance with deferred

Community
  • 1
  • 1
HayatoY
  • 527
  • 1
  • 4
  • 13