import com.google.appengine.api.labs.taskqueue.Queue; import com.google.a开发者_开发知识库ppengine.api.labs.taskqueue.QueueFactory; import static com.google.appengine.api.labs.taskqueue.TaskOptions.Builder.*;
// ... Queue queue = QueueFactory.getDefaultQueue(); queue.add(url("/worker").param("key", key))
in the code example given on the google task queue documentation page i can't understand the url("/worker") function they are calling in the queues.add() invocation .
The URL is the URL that will be called to execute the task. AppEngine is very URL-oriented, and the task that is executed by the task queue is referred to by a URL.
From the docs:
App Engine applications can perform background processing by inserting tasks (modeled as web hooks) into a queue.
The key point here is web hooks. Google can help you with web hooks.
精彩评论