I'm in the process of rewriting a web spider (originally in twisted circa 2005)
, and keep running into an issue with deferreds releasing too many tokens.
i've been playing around with this all day, and can't seem to shake this
problem.
i'm guessing that i designed the application logic wrong
This is a better way of using DeferredSemaphore:
def queue_thread( self , data=None ):
self.queued_data= data
return self.semaphoreService.run( self._T_to_thread )
It handles acquisition and release for you. This will avoid any code
path that might result in a double-release.
oooh!
thanks. I'm going to try and reimplement with that right now!
On Sep 26, 2012, at 5:09 PM, Stephen Thorne wrote:
> This is a better way of using DeferredSemaphore:
>
>def queue_thread( self , data=None ):
>self.queued_data= data
>return self.semaphoreService.run( self
while migrating some functionality to a deferred callback chain and debugging
my app, i noticed this oddity...
if a function doesn't have the proper args/kwargs definition, no error is
raised and everything just hangs
for example, if i have these 2 class functions in an internet.TimerService
m
On Wed, Sep 26, 2012 at 7:46 PM, Jonathan Vanasco
wrote:
> while migrating some functionality to a deferred callback chain and
> debugging my app, i noticed this oddity...
>
> if a function doesn't have the proper args/kwargs definition, no error is
> raised and everything just hangs
>
> ...
> t
thanks so much for the quick response, and i wish i thought of looking in the
FAQ ( just searched online, and nothing relevant came up )
Will defer.setDebugging(True) make these errors print/log sooner ? i'm in the
process of getting all the addErrback() commands and making this app "proper",