[Twisted-web] Re: Twisted-web Digest, Vol 15, Issue 20
Dave Gray
dgray at omniti.com
Tue Jun 28 10:10:20 MDT 2005
Oh hi there, I missed this reply.
Richard Meraz wrote:
> Thanks Dave: very clear and easy to follow answer and example code. I
> definitely appreciate your time.
>
> Final question. Is there a convenient way to put an upper-bound on
> how long twisted.web.client.getPage is allowed to complete its work. I
> know twisted.web.client.getPage takes a timeout parameter, but this
> seems more like a socket timeout which won't kill for example a
> getPage waiting on a low-bandwidth server (is my understanding
> correct?)
>
> For example, if I'm using the asyncore.py framework to mange IO i can
> use the channel.timestamp attribute to examine how long things have
> been going in order to kill long-running IO in a polling loop. Of
> course with asyncore I can manage my own polling loop which I can't
> see an easy way to do using reactor() (someone care to comment on that
> since I'm probably missing something).
It looks to me like it should timeout on a slow download - is it not
doing that?
Check out HTTPPageGetter.timeout and HTTPClientFactory.buildProtocol
(which sets up the timeout calls) in twisted/web/client.py
More information about the Twisted-web
mailing list