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. Related clarification is provided in the "Creating Tasks" on-line
document.
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 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.