问题描述
我将任务添加到任务队列中。但是,当任务运行时,出现以下错误:
Java代码:
字符串url =/myapp/showDetails.htm?userEmail=\"+userEmail;
队列队列= QueueFactory.getDefaultQueue();
TaskOptions objTskOptions = TaskOptions.Builder.withUrl(url)
.header(Host,BackendServiceFactory.getBackendService()
.getBackendAddress(BackendName))。method(Method.GET)
.retryOptions(RetryOptions.Builder.withTaskRetryLimit(5).maxDoublings(3));
queue.add(objTskOptions);
logger.info(Task Queue URL ::+ objTskOptions.getUrl());
为什么会收到此错误讯息?
Task Queue异步运行代码,并且结果对用户不可见。看来你的url /myapp/showDetails.htm
正在生成html?
还要确保你可以真正地手动调用完整的URL(在您的后端实例上执行):例如 shareduserlevelcontacts.yourapp.appspot.com/myapp/showDetails.htm?userEmail=some@email
I am adding my tasks to the Task Queue. But when the tasks run, I get the following error:
Java Code:
String url = "/myapp/showDetails.htm?userEmail="+userEmail;
Queue queue = QueueFactory.getDefaultQueue();
TaskOptions objTskOptions = TaskOptions.Builder.withUrl(url)
.header("Host",BackendServiceFactory.getBackendService()
.getBackendAddress("BackendName")).method(Method.GET)
.retryOptions(RetryOptions.Builder.withTaskRetryLimit(5).maxDoublings(3));
queue.add(objTskOptions);
logger.info("Task Queue URL::"+objTskOptions.getUrl());
Why am I getting this error message?
The Task Queue runs code asynchronously and it's result is not visible to the user. It seems that your url /myapp/showDetails.htm
is producing html?
Also make sure that you can actually invoke the full url by hand (executing on your backend instance): e.g. shareduserlevelcontacts.yourapp.appspot.com/myapp/showDetails.htm?userEmail=some@email
这篇关于HTTP状态代码200-299或400的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!