Hello Azeem, 

If you want to get familiar with task queues, you are encouraged to follow 
a complete example. The one provided in documentation is: "Enqueue.java" on 
github 
<https://github.com/GoogleCloudPlatform/java-docs-samples/blob/master/appengine-java8/taskqueues-push/src/main/java/com/example/appengine/taskqueue/push/Enqueue.java>.
 
Related clarification is provided in the "Creating Tasks" on-line document 
<https://cloud.google.com/appengine/docs/standard/java/taskqueue/push/creating-tasks>
. 

In particular, the code portion dealing with task creation is a little more 
complex: 

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

Queue queue = QueueFactory.getDefaultQueue();
queue.add(TaskOptions.Builder.withUrl("/worker").param("key", key));

It seems that writing to the datastore fails. It might be advisable to 
modify the line: 

ofy().save().entity(post).now(); 

and modify it in similar to: 

@Entity
class Car {
    @Id String vin; // Can be Long, long, or String
    String color;
}

that is by creating a class for the entity and instantiating it with a 
"new" statement: 

ofy().save().entity(new Car("123123", "red")).now(); 

More information is to be found in the github page 
<https://github.com/objectify/objectify> for Objectify, under "Features". 

You may check your app's logs for relevant messages. If you would like us 
to examine your project's logs and general settings, you may send us 
private email with project ID using the drop-down menu at the top right of 
the edit window. 


-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/6115ea78-63d6-4f2c-9a9a-ba950dda98cf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to