[Twisted-Python] Deferring 201 status code

2015-06-23 Thread Vikas Kumar
Hi, My controller code first updates DB and then sends out 201 status code indicating it is done updating in DB. Issue is somebody waiting to fetch this update from DB will not work immediately because DB update takes some time(approximately 0.5 second) to come into effect. Is there a way I can c

[Twisted-Python] Manhole info needed

2014-11-10 Thread Vikas Kumar
Hi, Can somebody tell me what is the need of manhole in twisted? Specially I've seen them in files like tap.py (twisted application process). One usecase I've seen them is wrt ShellFactory classes: manhole = ShellFactory() manhole.setService(self) internet.TCPServer(.config.dget('js

Re: [Twisted-Python] Return only when value/handle is available

2014-09-03 Thread vikas kumar
s > 0: retries -= 1 d = Deferred() reactor.callLater(interval, d.callback, None) yield d else: raise e On Wed, Sep 3, 2014 at 1:32 PM, vikas kumar <mailto:vikas.c.ku...@oracle.com>> wrote: Hi, I am little new to tw

[Twisted-Python] Return only when value/handle is available

2014-09-03 Thread vikas kumar
Hi, I am little new to twisted. I've a function(get_handle) which returns a handle. But get_handle() may throw an exception(SystemDelayException) because of some delay in system. My requirement is : When I get SystemDelayException re-attempt get_handle() and return only when handle is availabl