neat - now I get it. That's a nice hack!
Did you find that out from the Google App Engine group, or thought of
it yourself?

Richard


On Oct 29, 10:29 am, Robin B <robi...@gmail.com> wrote:
> > The docs say a task will run when resources are free. In your
> > experience do the tasks generally run on time?
>
> Yes, they are trying to say that task queue webhooks are subject to
> the same quota restrictions as your app.
>
> > Also how would you make a task run periodically?
>
> This is answered in a previous message in this thread:
>
> "To keep an app hot, use the task
> queue to hit a url that simply returns a non-200 HTTP status code, so
> the task will retry indefinitely at up to 10 Hz (10 calls/second), you
> can specify how often a task is called."
>
> Tasks are considered 'completed' and removed if they result in a 200
> HTTP status code.
>
> > My understanding is
> > they are for one off events and cron is for periodic.
>
> You are right, always returning a non-200 status code is obviously not
> the intended purpose of the task queue, but in this situation we are
> hacking the task queue to accomplish a specific goal of calling the
> task periodically since tasks can run much more frequently than cron
> which is necessary to keep a handler 'hot'.
>
> Robin
>
>
>
> > Richard
>
> > On Oct 28, 11:23 pm, Robin B <robi...@gmail.com> wrote:
>
> > > Oops typo: I said cron is 1/sec it actually its 1/minute, task queue
> > > is 10/second, so cron is not fast enough but task queue is plenty
> > > fast.
>
> > > Robin
>
> > > On Oct 28, 4:18 am, Richard <richar...@gmail.com> wrote:
>
> > > > that's really useful - thanks Robin!
>
> > > > if Python handlers last ~15 seconds then wouldn't cron be fast enough
> > > > (at 1/sec)?
> > > > Task queue is labelled experimental so I am wary to use it at the
> > > > moment.
>
> > > > Richard
>
> > > > On Oct 28, 4:13 pm, Robin B <robi...@gmail.com> wrote:
>
> > > > > > How long does it stay cached?
>
> > > > > Inactive Python handlers used to last ~1 minute, recently it is closer
> > > > > to 15 seconds.
>
> > > > > Java servlets last longer, over a minute, maybe becuase they are so
> > > > > slow to boot (6 seconds +).
>
> > > > > One of the coming releases is supposed to speed up the cold boot
> > > > > times.
>
> > > > > Cron has a maximum frequency of 1 Hz (1 call/second), so it is no
> > > > > longer fast enough to do the job.  To keep an app hot, use the task
> > > > > queue to hit a url that simply returns a non-200 HTTP status code, so
> > > > > the task will retry indefinitely at up to 10 Hz (10 calls/second), you
> > > > > can specify how often a task is called.
>
> > > > > Robin
>
> > > > > On Oct 27, 9:53 pm, mdipierro <mdipie...@cs.depaul.edu> wrote:
>
> > > > > > How long does it stay cached?
>
> > > > > > On Oct 27, 9:26 pm, Thadeus Burgess <thade...@thadeusb.com> wrote:
>
> > > > > > > run a cron on your local computer to urllib the page ? :) All I 
> > > > > > > can come up
> > > > > > > with. It is just one of the ways GAE works, when a page is no 
> > > > > > > longer needed,
> > > > > > > it kills the processes until their needed again. Had this problem 
> > > > > > > with
> > > > > > > dreamhost before they supported Passenger
>
> > > > > > > -Thadeus
>
> > > > > > > On Tue, Oct 27, 2009 at 6:57 PM, mdipierro 
> > > > > > > <mdipie...@cs.depaul.edu> wrote:
>
> > > > > > > > I do not know.
>
> > > > > > > > On Oct 27, 6:51 pm, Richard <richar...@gmail.com> wrote:
> > > > > > > > > is it possible to get web2py on GAE as responsive as 
> > > > > > > > > Slicehost? (See
> > > > > > > > > Thadeus' app: surrenderthebooty.thadeusb.com)
>
> > > > > > > > > On Oct 26, 4:42 pm, Richard <richar...@gmail.com> wrote:
>
> > > > > > > > > > I noticed my GAE app is slow for the first webpage I load, 
> > > > > > > > > > but snappy
> > > > > > > > > > for subsequent webpages.
> > > > > > > > > > So it seems there is a caching issue, which has been 
> > > > > > > > > > discussed a few
> > > > > > > > > > times (courtesy of Google site search):
> > > > > > > >http://groups.google.com/group/web2py/browse_thread/thread/329388bec9....
> > > > > > > > ..
>
> > > > > > > > > > Is there a way to keep the web2py structures cached? 
> > > > > > > > > > Perhaps a CRON
> > > > > > > > > > job to load a page every so often?
>
> > > > > > > > > > And are there other ways to tune apps on GAE, such as 
> > > > > > > > > > setting
> > > > > > > > > > "migrate=False"?
>
> > > > > > > > > > thanks,
> > > > > > > > > > Richard
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to