Reputation: 1
I tried the following to pass a TaskQueue to a Backend but it didn't work.
Is there a problem with this syntax?
try{
Queue queue = QueueFactory.getQueue("pine");
TaskOptions options = TaskOptions.Builder.withUrl("/pine/task/getbusy");
options = options.param("taskparams", params);
options = options.header("Host",
BackendServiceFactory.getBackendService().getBackendAddress("pinetask", 1));
queue.add(options);
}
backend.xml:
<backends>
<backend name="pinetask">
<class>B2</class>
<instances>1</instances>
<max-concurrent-requests>1</max-concurrent-requests>
<options>
<public>false</public>
<dynamic>true</dynamic>
</options>
</backend>
</backends>
Upvotes: 0
Views: 429
Reputation: 1823
try this for the "Host" header:
options = options.header("Host", BackendServiceFactory.getBackendService().getBackendAddress("pinetask"));
Upvotes: 0