On 30 Jul 2010, at 18:10, Sandeep Ghosh wrote:

Hi,
  I am facing promlem of entering many data into the Google App
engine database as its taking more then 30 sec time limit.

PersistenceManager pm = PMF.get().getPersistenceManager();
for(;;)
{
EnterData data = new EnterData(key,value,new Text(totaData));//
EnterData is my class Entity
pm.makePersistent(data);
}

How can i use the Tasks/Queues in this scenario

You could try using bulk put rather than making a datastore call for every iteration.

You can also do many store operations in parallel if you use Twig like this:

for (...)
{
        datastore.store().instance(data).later();
}

this is an non-blocking async call that returns immediately and lets you run all your operations in parallel.

Otherwise, to use task queues I would recommend using the Deferred library to chain tasks:

http://groups.google.com/group/google-appengine-java/browse_thread/thread/6f736624cc820d5b


--
You received this message because you are subscribed to the Google Groups "Google 
App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to