How to use Modules in Google App Engine and add a target to them using Task Queue (Java)?

后端 未结 2 2039
臣服心动
臣服心动 2021-01-21 12:51

I have a task that exceeds more than 10 minutes deadline of the Task Queue. Going through different documentations, I found that using modules I could run an instance that would

2条回答
  •  灰色年华
    2021-01-21 13:39

    Modules and Services are the same thing, they're similar to the old backends (which still work, but are deprecated).

    There are two basic ways of getting modules to work:

    • Create an EAR and deploy that
    • Deploy services independently as WAR files (which is probably what you're doing now to the default module)

    The second option is probably easier, because it's just a matter of changing your application-web.xml. You could have a repo or branch per module, or just a build process that changes the module you're targeting.

    Right now your application-web.xml probably has something like this:

    @appId@
    @appVersion@    
    default   
    

    change it to something like this

    @appId@
    @appVersion@    
    long-running-service
    B1
    
        1
    
    

    You configure the queue itself to target a specific module in queue.xml See here.

提交回复
热议问题