Re: [Twisted-Python] file descriptor cannot be a negative integer (-1)

2010-09-19 Thread Glyph Lefkowitz
On Sep 17, 2010, at 8:21 PM, ruslan usifov wrote: > Its a simply fastcgi proxy, which reads all request(analize it, do some > pending things and then proxy request to real worker) I am very curious about your problem, but I cannot help you with it with the incomplete snippets you have provided

Re: [Twisted-Python] how to implement sleep?

2010-09-19 Thread ruslan usifov
Can you provide some code to use it? In maner like protocol.ClientCreator? Perhaps you want ReconnectingClientFactory ? Set maxRetries to 3. See > twisted.internet.protocols.ReconnectingClientFactory. > > > -- > Regards, > Stephen Thorne > Development Engineer > Netbox Blue > > __

Re: [Twisted-Python] how to implement sleep?

2010-09-19 Thread Luke Marsden
Hi Ruslan, Try this to drop in to your code, as in: sleep(3) def sleep(secs): d = defer.Deferred() reactor.callLater(secs, d.callback, None) return d Cheers, Luke On Sun, 2010-09-19 at 16:04 +0400, ruslan usifov wrote: > Hello > > Twisted is great, but how cant i emulate sleep beh

Re: [Twisted-Python] how to implement sleep?

2010-09-19 Thread Itamar Turner-Trauring
On Sun, 2010-09-19 at 22:41 +1000, Andrew Bennetts wrote: > ruslan usifov wrote: > >Hello > > > >Twisted is great, but how cant i emulate sleep behaviour in syested. I > > Specifically, deferLater is a

Re: [Twisted-Python] how to implement sleep?

2010-09-19 Thread Andrew Bennetts
ruslan usifov wrote: >Hello > >Twisted is great, but how cant i emulate sleep behaviour in syested. I -Andrew. ___ Twisted-Python mailing list Twisted-Pytho

Re: [Twisted-Python] how to implement sleep?

2010-09-19 Thread Stephen Thorne
On 2010-09-19, ruslan usifov wrote: > Twisted is great, but how cant i emulate sleep behaviour in syested. I know > that exists callLater, but how to use it in yield scenario, like here: > > @inlineCallbacks > def work(self): > l_attempts = 0; > > while l_attemps < 3: > try: >

Re: [Twisted-Python] how to implement sleep?

2010-09-19 Thread Donal McMullan
except: l_attempts += 1 yield reactor.callLater(3, self.work) Total guess Donal On 20/09/2010, at 12:04 AM, ruslan usifov wrote: > Hello > > Twisted is great, but how cant i emulate sleep behaviour in syested. I know > that exists callLater, but how to use it in yield scenario, like

[Twisted-Python] how to implement sleep?

2010-09-19 Thread ruslan usifov
Hello Twisted is great, but how cant i emulate sleep behaviour in syested. I know that exists callLater, but how to use it in yield scenario, like here: @inlineCallbacks def work(self): l_attempts = 0; while l_attemps < 3: try: resp = yield break;