[Twisted-Python] How to detect when there is nothing waiting in the event queue

2009-09-14 Thread Mark Visser
Hi, we've been using Twisted in an internal project for the past 4 months. It's a system that polls for events from a web source (looping call) and also accepts connections via perspective broker. Each of these events is turned into a series of Deferreds that run various tasks. Some of these ta

[Twisted-Python] simple global counter

2009-09-14 Thread Artem Bokhan
Hello. May somebody give a sample code of simple global counter which could be used with twisted (non-web) enviroment? ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

[Twisted-Python] help with rector

2009-09-14 Thread Freddy Martinez Garcia
hello to everybody... well I need to do something with twisted, and I don't how I can do it... My application use the twisted's framework, and it is a process manager. My problem is when I run a process with twisted I have to do "reactor.run()" and my application is one web service which is run

[Twisted-Python] memory leak on 8.2.0/2.6 versus 2.5/2.4

2009-09-14 Thread Alec Matusis
I am running identical twisted servers under high load, one on 2.5.0 (patched for epoll bug) on python 2.4.4 and second one on 8.2.0 on python 2.6.2. The 8.2/2.6 one leaks memory compared to 2.5/2.4.4 to the point that I am about to roll back to older Twisted and then to older Python. Any insight

Re: [Twisted-Python] help with rector

2009-09-14 Thread Kevin Horn
On Mon, Sep 14, 2009 at 1:57 PM, Freddy Martinez Garcia < fre...@cbm.uo.edu.cu> wrote: > hello to everybody... > > > well I need to do something with twisted, and I don't how I can do it... > > > My application use the twisted's framework, and it is a process manager. My > problem is when I run a

Re: [Twisted-Python] simple global counter

2009-09-14 Thread Tim Allen
On Mon, Sep 14, 2009 at 10:09:38PM +0700, Artem Bokhan wrote: > May somebody give a sample code of simple global counter which could be > used with twisted (non-web) enviroment? I'm not sure what you mean. If you want to keep a count of something, you can just store it in a variable like anythin

Re: [Twisted-Python] How to detect when there is nothing waiting in the event queue

2009-09-14 Thread Tim Allen
On Mon, Sep 14, 2009 at 12:11:46PM -0400, Mark Visser wrote: > I've added a signal handler to catch SIGHUP and call stop() on the > looping call and stopListening() on the perspective broker Root. How can > I detect when all remaining Deferreds have fired so I can stop the > reactor safely, with

Re: [Twisted-Python] help with rector

2009-09-14 Thread exarkun
On 06:57 pm, fre...@cbm.uo.edu.cu wrote: >hello to everybody... > >well I need to do something with twisted, and I don't how I can do >it... > >My application use the twisted's framework, and it is a process >manager. My >problem is when I run a process with twisted I have to do >"reactor.run()"