[Twisted-Python] Aborting callback chain with an errback
![](https://secure.gravatar.com/avatar/1cc7eeef749e51fbcae990805cce634d.jpg?s=120&d=mm&r=g)
What is the proper way to handle an uncorrectable error? I have code that looks like: def callXMLRPC(self,stringValue,intValue): return(xmlProxy.callRemote("myFunc",{...}) \ .addCallback(self.rpcSuccess).addErrback(self.rpcFailure)) and in a derived class: def specificQuery(self): return self.callXMLRPC("Ask Thing", 3).addCallback(self.handleResult) what I'd like to have happen is if an error is raised in callRemote, rpcFailure does some cleanup and no further callbacks are executed. I can't fix the failure, but I don't want a message logged into my error log everytime, it's not unhandled, just that there's nothing to be done and callbacks won't have the data to run. If I want to deal with it further I'd want to do it in the base class. How can I do that? Am I doing something nonsensical here? Andy Fundinger -- Blog: http://channel3b.wordpress.com Second Life Name: Ciemaar Flintoff
![](https://secure.gravatar.com/avatar/71dd33d3f5e5e7907efb3d97cb2c0651.jpg?s=120&d=mm&r=g)
Here's a description of my general game plan and my questions are below: THE MISSION Create a GUI-based, dashboard-like application that monitors the overall health of our resources. It would be a tool that helps pinpoint trouble spots when performance is less than desirable. Ideally, we would get such a good handle on it that it would warn us of impending trouble before it causes a failure. SAMPLE FUNCTIONS FOR THE APPLICATION Monitor web traffic by distilling down Apache logs Monitor server hardware through built in firmware http interface Monitor server health via command line commands: disk space processor load etc. Monitor database health via command line commands Monitor backup success through log output Monitor misc. server messages Monitor switch traffic Monitor processes ...And more. POSSIBLE CONSTRAINTS Our main servers are on a WAN whose security is the job of the greater org. We have access through SSL connections now, but we may not be able to get permissions to open any additional ports for our monitoring purposes. THE QUESTIONS Very basic question: am I better off leaving most of the heavy lifting (as in the programming logic) on the client side? This would mean more data would have to pass from server to client app (e.g. a whole web log or part thereof) which is the downside. The upside is that in a failure emergency situation if my server is still up enough to have a SSH connection my dashboard app may still be useful to me. Thoughts? If we are not constrained to only get our info via SSH what's the best kind of connection to have? My thought is to use the Prospective Broker since that seems to be the most Pythonistic option. Is it possible to encrypt the PB server connection? Are there any Twisted methods of tunneling through an existing SSH connection (just a wild thought)? Thanks, Paul
![](https://secure.gravatar.com/avatar/71dd33d3f5e5e7907efb3d97cb2c0651.jpg?s=120&d=mm&r=g)
Here's a description of my general game plan and my questions are below: THE MISSION Create a GUI-based, dashboard-like application that monitors the overall health of our resources. It would be a tool that helps pinpoint trouble spots when performance is less than desirable. Ideally, we would get such a good handle on it that it would warn us of impending trouble before it causes a failure. SAMPLE FUNCTIONS FOR THE APPLICATION Monitor web traffic by distilling down Apache logs Monitor server hardware through built in firmware http interface Monitor server health via command line commands: disk space processor load etc. Monitor database health via command line commands Monitor backup success through log output Monitor misc. server messages Monitor switch traffic Monitor processes ...And more. POSSIBLE CONSTRAINTS Our main servers are on a WAN whose security is the job of the greater org. We have access through SSL connections now, but we may not be able to get permissions to open any additional ports for our monitoring purposes. THE QUESTIONS Very basic question: am I better off leaving most of the heavy lifting (as in the programming logic) on the client side? This would mean more data would have to pass from server to client app (e.g. a whole web log or part thereof) which is the downside. The upside is that in a failure emergency situation if my server is still up enough to have a SSH connection my dashboard app may still be useful to me. Thoughts? If we are not constrained to only get our info via SSH what's the best kind of connection to have? My thought is to use the Prospective Broker since that seems to be the most Pythonistic option. Is it possible to encrypt the PB server connection? Are there any Twisted methods of tunneling through an existing SSH connection (just a wild thought)? Thanks, Paul
participants (2)
-
Andy Fundinger
-
Paul_S_Johnson@mnb.uscourts.gov