2

I'm trying to convert my current GAE project to using modules. I'd like all tasks of a certain path to run on a specific module.

I understand that in production, I can just enqueue the task as normal and the dispatch file handles routing it to the correct module.

However, how can I get this same behaviour in the dev server? I'd rather not do something hackey like addressing the module directly.

Thanks!

aloo
  • 5,331
  • 7
  • 55
  • 94
  • Is there anything in the "Routing Requests to Modules" docs that is not working for you? https://developers.google.com/appengine/docs/java/modules/routing – marianosimone Apr 15 '14 at 13:09
  • No - that stuff works as documented. Just wondering how other people do it. If I have to manage a dispatch file thats used in prod to route tasks but then also address the modules directly when enqueuing tasks - its seems hard to manage because there are two places where these paths exist. – aloo Apr 15 '14 at 17:18
  • In that case, I don't know a way to do it directly. If you just want to avoid having that duplicated info, you could enqueue all tasks through a dedicated module which actually has all urls declared and just dispatchs to the desired one, but I think that's an overkill. – marianosimone Apr 15 '14 at 20:19

1 Answers1

5

Instead of using path routing to get your tasks to run on specific modules, you could create a queue for each module with the correct target parameter. Any task that you send to this queue will be executed against that module. You could even create a separate queue for each class of task.

Matt Faus
  • 6,321
  • 2
  • 27
  • 43