Java

Hi, I am new to the concept of task queue when I called the manual that I hit on this line

queue.add(
      DatastoreServiceFactory.getDatastoreService().getCurrentTransaction(),
      TaskOptions().url("/path/to/my/worker")); 

what is a TaskOptions()method. Whether the default method is a manually created method, the method will be returned TaskOptions().

I created a method called TaskOption()when I returned the string value, saying it as"The method url(String) is undefined for the type String"

In url, what I want to specify a servlet is any other.

My doubt may be stupid, but please clarify this.

Thanks, Sharun.

+3
source share
2 answers

doco . , TaskOptions.Builder, , , TaskOptions. , :

queue.add(
     DatastoreServiceFactory.getDatastoreService().getCurrentTransaction(),
     TaskOptions.Builder.url("/path/to/my/worker")); 
+3

. , Queue.

import com.google.appengine.api.labs.taskqueue.Queue;

queue.add(TaskOptions.Builder.url("")).

import com.google.appengine.api.taskqueue.Queue;

.

0

Source: https://habr.com/ru/post/1749710/


All Articles