Hi Robert, How naming the task will help me?Sorry i didnt understand it. But anyways i have named them now.
In My code i have made sure that whatever exception comes from my code will not be thrown out of my controller and will just print it in log. So in what scenerio it failed and retried and also before failing completely it added next task in the queue which is my last statment in my controller.(Thats how i got more then 1 task in my queue) And if it failed to add Task then it should retry the current task and i should still have 1 active task only. and today also i found that my task stopped. I dont know how can i make sure that i can run one task every N seconds and i dont need to monitor it manually..... Thanks Ravi. On Sat, Apr 30, 2011 at 9:01 PM, Robert Kluin <[email protected]>wrote: > Hi Ravi, > You should name your tasks. If one fails and retries for some > reason, or runs multiple times, then the tasks will start to fan-out > (think fork-bomb). > > http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#taskName(java.lang.String) > > > To control the delay you can set a countdown or eta. Note that the > time you specify is like a request, I've not seen tasks run before > than time, but tasks will sometimes run later than requested. > > http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#countdownMillis(long) > > > Robert > > > > > > On Sat, Apr 30, 2011 at 02:13, Ravi Sharma <[email protected]> wrote: > > Hi , > > I have a chained task which runs every 1 second(Still wondering how can i > > run it every 3 seconds) > > Task code is something like this > > try{ > > //Do something > > //read data store and update datastore > > }catch(Throwable ex){ > > logger.log(Level.Sever,ex.getMessage(),ex); > > }finally{ > > //add next task to queue to be run next > > Queue queue = QueueFactory.getQueue("queuename"); > > > > > queue.add(TaskOptions.Builder.withUrl("/tasks/mytask/"+auctionId).method(Method.GET)); > > } > > > > Now i expect that one task will be finished and next will be added to the > > queue. 2 days back i found 4-5 tasks in the queue i dont know how they > got > > there > > > > and today i found tasks queue empty. How it can be possible that queue > can > > get more then 1 task at a time or it can get empty.I still have quota > left > > for the day. > > > > My App Name is edurectory > > > > > > -- > > You received this message because you are subscribed to the Google Groups > > "Google App Engine" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected]. > > For more options, visit this group at > > http://groups.google.com/group/google-appengine?hl=en. > > > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/google-appengine?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
