On 02:49 am, jjo...@nextdigital.com wrote:
>I'm trying to make a simple deferred that will continue get a message
>of
>a message queue, process it and then wait for another message.
>
>While I can get the first message easily I am unable to work out how I
>can get a second message without creating
So one problem is understanding the reactor. It's only meant to be
run once. Some of your code looks like it's trying to start it more
than once. You only want one started at a time or weird things
happen. I'd start here and make sure you understand the reactor:
http://twistedmatrix.com/proje
I understand how the deferreds can create concurrency, but I still
cant' figure out how to get the process to loop correctly
I changed the code to use multiple deffereds, but I feel I'm missing a
basic architectural design on how to get the process to run in a loop.
Any help would be greatly appr
On Sun, Jan 4, 2009 at 11:23 PM, Robert Hancock
wrote:
>> How many urls are in url_tuples?
> 4 - 32
>> Is there a reason why you're using just one deferred?
> What is the advantage of using more?
>
Concurrency.
-Drew
___
Twisted-Python mailing list
Tw
>
>
> > Is there a reason why you're using just one deferred?
> What is the advantage of using more?
>
If you use more with a DeferredList you can have [effectively] parallel page
fetches. It's like spawning threads for each page, but twisted doesn't
actually spawn threads for this I don't think.
> How many urls are in url_tuples?
4 - 32
> Is there a reason why you're using just one deferred?
What is the advantage of using more?
> Also why not use client.downloadPage to put the contents into files?
Because I may want to parse the output before writing to a file.
__
How many urls are in url_tuples?
>
> Is there a reason why you're using just one deferred?
>
> Also why not use client.downloadPage to put the contents into files?
>
> Terry
>
> ___
> Twisted-Python mailing list
> Twisted-Python@twistedmatrix.com
> http
In twisted a polling loop usually translates into either a system of
reactor.callLaters or a twisted.internet.task.LoopingCall.
Either like this this:
def __init__(self,oaf,interval=600):
self.interval=interval
reactor.callLater(5,self.checkSystem)
def checkSystem(self):
> "Robert" == Robert Hancock writes:
Robert> I want to put this into a loop and run it as a daemon, but the
Robert> looping is causing me a problem. I've tried making the above into
Robert> a procedure (minus the stop working call back and reactor.run())
Robert> and it does not run. Any sug