Re: [Twisted-Python] Advice on porting Python application to Twisted

2013-08-28 Thread Matthew Humphrey
Phil - I am aware of LoopingCall. I saw the mention of cooperate/coiterate on some page somewhere, and actually went off trying to find an explanation / example but did not find anything. If you have a link with some details, I would like to take a look. Thanks On Wed, Aug 28, 2013 at 6:54 AM,

Re: [Twisted-Python] Advice on porting Python application to Twisted

2013-08-28 Thread Matthew Humphrey
SOrry - last reply was meant for Tom! On Wed, Aug 28, 2013 at 8:47 PM, Matthew Humphrey wrote: > Phil - Thanks so much. This is pretty much exactly what I was looking for. > I tried the approach you suggested for timer events, and it seems very > clean and works quite well. I was able to get it

Re: [Twisted-Python] Advice on porting Python application to Twisted

2013-08-28 Thread Matthew Humphrey
Phil - Thanks so much. This is pretty much exactly what I was looking for. I tried the approach you suggested for timer events, and it seems very clean and works quite well. I was able to get it working very consistently with intervals < 10ms (way more than I need). I haven't tried the process man

Re: [Twisted-Python] Graceful shutdown

2013-08-28 Thread Aaron Gallagher
I didn't read over your code, but this is something that I've independently implemented. You can see my implementation at . The Site subclass does some other monitoring-related things, but you should be able to tease out just the graceful

[Twisted-Python] Graceful shutdown

2013-08-28 Thread Jonas Lindmark
Hi! I'm trying to implement graceful shutdown of a HTTP server and I am unsure of the preferred way of implementing it. I'm attempting to do this by adding a system event trigger for "before" "shutdown" that should stop accepting new requests and wait for current ones to finish. My problem is th

Re: [Twisted-Python] Advice on porting Python application to Twisted

2013-08-28 Thread Phil Mayers
On 28/08/13 14:40, Tom Sheffler wrote: Hi Matthew - I have a couple of idioms I use for #2 and #3 in your message. Here they are. #2) For timer events, I create a function that when called, continuously schedules itself again in the reactor, does some work for the curren Are you aware of t

Re: [Twisted-Python] Advice on porting Python application to Twisted

2013-08-28 Thread Tom Sheffler
Hi Matthew - I have a couple of idioms I use for #2 and #3 in your message. Here they are. #2) For timer events, I create a function that when called, continuously schedules itself again in the reactor, does some work for the current tick, and then exits. I've used this down to 1-second interv

Re: [Twisted-Python] Failure.getTraceback and Unicode

2013-08-28 Thread Tobias Oberstein
Hi Jean-Paul, > >Should I file a bug? > > It seems unfortunate that trying to report an exception will fail because of > encoding issues. That seems like a bug worth fixing to me. Alright. https://twistedmatrix.com/trac/ticket/6708 /Tobias > > Jean-Paul > >