[Twisted-Python] subclassing and mixing protocol.ReconnectingClientFactory and pb.PBClientFactory

2009-04-30 Thread Fabrizio Mancini
Hi, i've implemented a pb client by writing a class which inherits from object and a class which inherits from ReconnectingClientFactory and PBClientFactory. Till now it's all ok, the client detects the disconnection and try to reconnect with an exponential delay if the connection is not immediatly

Re: [Twisted-Python] cx_Oracle, Twisted - rollback failed

2009-04-30 Thread Steve Lewis
> Is there some way it can determine that the connection has been lost aside > from trying the rollback (and is compatible with other DB-API 2.0 modules)? > > Jean-Paul Oops, I actually did see my message going through now. Sorry for the duplicate. To answer your question, I was under the impres

[Twisted-Python] cx_Oracle, Twisted - rollback failed

2009-04-30 Thread Steve Lewis
(If anyone gets this twice, apology in advance. I think I jumped the gun in sending the email before I got my acknowledge welcome email for the list.) It looks like the latest version 8.2 tries to rollback without seeing if the connection is even open or not: def rollback(self): if

Re: [Twisted-Python] handling CTRL-C

2009-04-30 Thread Fabrizio Mancini
> The best way is to have an IService provider with a stopService method > which does whatever shutdown cleanup you want done, possibly returning > a Deferred which doesn't fire until it has finished.  However your app > is shut down, this will cause your cleanup code to run. Thank you, i will stu

Re: [Twisted-Python] handling CTRL-C

2009-04-30 Thread Fabrizio Mancini
On Thu, Apr 30, 2009 at 3:04 PM, Itamar Shtull-Trauring wrote: > On Thu, 2009-04-30 at 14:44 +0200, Fabrizio Mancini wrote: >> Hi, >> i know twisted already manage CTRL-C keystroke, but i'd like to add >> some other action when CTRL-C is pressed. >> I've implemented a perspective broker server, wh

Re: [Twisted-Python] handling CTRL-C

2009-04-30 Thread Jean-Paul Calderone
On Thu, 30 Apr 2009 14:44:08 +0200, Fabrizio Mancini wrote: >Hi, >i know twisted already manage CTRL-C keystroke, but i'd like to add some >other action when CTRL-C is pressed. >I've implemented a perspective broker server, which have a DeferredQueue and >a lot of elements in it. >I'd like to writ

Re: [Twisted-Python] handling CTRL-C

2009-04-30 Thread Itamar Shtull-Trauring
On Thu, 2009-04-30 at 14:44 +0200, Fabrizio Mancini wrote: > Hi, > i know twisted already manage CTRL-C keystroke, but i'd like to add > some other action when CTRL-C is pressed. > I've implemented a perspective broker server, which have a > DeferredQueue and a lot of elements in it. > I'd like to

[Twisted-Python] handling CTRL-C

2009-04-30 Thread Fabrizio Mancini
Hi, i know twisted already manage CTRL-C keystroke, but i'd like to add some other action when CTRL-C is pressed. I've implemented a perspective broker server, which have a DeferredQueue and a lot of elements in it. I'd like to write to a file all those elements before the program shuts down. Is th

Re: [Twisted-Python] Catching exception on a Serial Connection

2009-04-30 Thread Jean-Paul Calderone
On Wed, 29 Apr 2009 18:09:08 -0500, "Nestor A. Diaz" wrote: >Hello, i am newbie to twisted, i am trying to find a way to catch >exceptions raised from a protocol over a serial line, like the >twisted.protocol.gps.zodiac, i see the demo script, on the twisted >website: >http://twistedmatrix.com/pr