> Restart was clean, while nobody was connected to the daemon. IMHO it
> shouldn't go this way. Is there any solution to this problem? Or maybe
> must take care of myself and try to detect such occurence and recreate
There's no need to recreate dbpool, basic reconnecting logic is already
there, if you look in SVN.
Specifically, look at the ConnectionPool class: There are two kwargs
that you can pass, cp_reconnect and cp_good_sql.
I use this version in production as part of a simple database uptime
monitor, and it works in a satisfactory manner. You may need to trap
ConnectionLost errors in some cases, in order to re-send your original
Hope this helps,
I couldn't find an example but I thought someone must have one laying
The question is, how do I decode the data from an http POST inside of
render_POST ? I'm not even sure what variables hold the data, and if
there are builtin methods somewhere to decode it and possibly stick it
in a dict?
I ran into two problems installing the Twisted 2.0 core pre-prerelease:
1) the post install script referred to by setup.py does not appear to exist
2) the twisted.python.dist module computed the data_files path with a
leading "\". So, for example, setup.py tried to copy
"\twisted\plugins.tml" rather than "twisted\plugins.tml" and couldn't
Anyone have any thoughts on using a lock class (using deferreds)
versus the built in transaction/locking support in BerkeleyDB?
My thought was this. It sure would be a lot simpler to just use a
lock class and the python built in dbm functions than having to use
the newer bsddb3 module and worry about BerkeleyDb environments and
The application is transaction oriented, and each transaction would
have one write and one read, each in a different lock.
Anyone see any problems with using a lock class in this way?
dumb question: would Twisted be suitable for the implementation of a server
application that exposes its services through Corba/COM/SOAP/whatever
client-server communication technology is currently "en vogue"/will be so
in the future?
I'd like to authenticate my PB client against a hashed password file,
but I'm getting an error when I use a hash:
Failure: twisted.cred.error.UnhandledCredentials: No checker for
However, if I use plaintext passwords, it works fine.
I'm working with the example in the book:
with the credential checker set to
myChecker = checkers.FilePasswordDB("my_hashed_passwd_file",
lambda u, p, h: sha.new(p).hexdigest())
I've tested this checker and hash, and they work fine for logging in
to my nevow site.
The example works, though if I use plaintext passwords and don't pass in a hash:
myPlaintextChecker = checkers.FilePasswordDB("my_plaintext_passwd_file")
Thanks for any hints,
Can you do something like this, assuming that _cbnext returns
d = req.dbpool.runInteraction(self.transaction._cbmakeDetailRec)
I'm using apache as proxy to a xmlrpc server. How do I set the client
xmlrpc to connect to apache using ssl, username and password?
A prototype of my idea:
from twisted.web.xmlrpc import Proxy
from twisted.internet import reactor
proxy = Proxy('https://localhost/RPC2')
""" apache should redirect to 192.168.2.22:7080... how do I send
username and password? """"