[Twisted-Python] Some "spread" objects and comparison semantics

2011-05-10 Thread Facundo Batista
I'm analysing the code in twisted/spread/flavors.py and twisted/spread/pb.py, trying to remove the __cmp__ and cmp() in RemoteCache, RemoteCacheMethod and RemoteCacheObserver classes. They all have __cmp__ methods, but as there is not any test for these, and it's not specified in the documentation

Re: [Twisted-Python] 100% CPU on high opened descriptors

2011-05-10 Thread Juan Antonio Ibañez Santorum
2011/5/10 Itamar Turner-Trauring > > Still having problems... > > > > I can see that twistd process has a higher number than 1024 looking at > > /proc/pid/limits but whe 1024 descriptors number gets reached the system > > becomes unstable. It also has been launche using '-r epoll' option. Any > >

Re: [Twisted-Python] 100% CPU on high opened descriptors

2011-05-10 Thread Itamar Turner-Trauring
> Still having problems... > > I can see that twistd process has a higher number than 1024 looking at > /proc/pid/limits but whe 1024 descriptors number gets reached the system > becomes unstable. It also has been launche using '-r epoll' option. Any > other idea? 0. What does "unstable" mean? 1.

Re: [Twisted-Python] 100% CPU on high opened descriptors

2011-05-10 Thread Reza Lotun
Hmm, are you running your process as root? If so, you may need to add the following two lines in /etc/security/limits.conf: root       soft    nofile      99 root       hard    nofile      99 (yes, root, even though you previously supplied '*'). I'd also reboot just to be sure. If you

Re: [Twisted-Python] 100% CPU on high opened descriptors

2011-05-10 Thread Juan Antonio Ibañez Santorum
Still having problems... I can see that twistd process has a higher number than 1024 looking at /proc/pid/limits but whe 1024 descriptors number gets reached the system becomes unstable. It also has been launche using '-r epoll' option. Any other idea? 2011/5/5 Reza Lotun > 2011/5/5 Juan Anto

Re: [Twisted-Python] Question about using the adbapi

2011-05-10 Thread Albert Brandl
On Mon, May 09, 2011 at 02:15:04PM +0300, Pandelis Theodosiou wrote: > a) keep the last (longitude, latitude) pair for every receiver stored > in your script, too, besides the db. When a new pair of values > arrives, compare it with the current and only if it is different, send > the "INSERT" q

Re: [Twisted-Python] Question about using the adbapi

2011-05-10 Thread Albert Brandl
On Mon, May 09, 2011 at 11:03:12AM -, exar...@twistedmatrix.com wrote: > > d.addCallback(f, x, y) will result in f(resultOfD, x, y) Cool - no need to wrap the method call :-). The documentation for runQuery does not mention this feature, though: "Returns a Deferred which will fire the return