So one problem is understanding the reactor. It's only meant to be
run once. Some of your code looks like it's trying to start it more
than once. You only want one started at a time or weird things
happen. I'd start here and make sure you understand the reactor:
http://twistedmatrix.com/proje
You'd want to use a connection pool to manage the db interaction.
Your server is pretty unusable after a db connection failure. I've
used the connection pool before with a cp_min of 1 and a cp_max of 2.
http://twistedmatrix.com/documents/8.2.0/api/twisted.enterprise.adbapi.ConnectionPool.html
O
self.dbcon = adbapi.ConnectionPool("pyPgSQL.PgSQL", database="data",
> user='pet', host='local', password='some')
>
> if __name__ == "__main__":
> reactor.listenTCP(8080, MyFactory())
> reactor.run()
>
> I usu
I can help you with this question:
> 2) There are still scenarios where I would want to run my code the
> "reactor" way rather than than using the application framework, and I would
> love to be able to keep a single file that's compatible with both modes..
> Is there a way to detect in runtime w
Hi, I'm curious if anyone has written a trial test to verify the
correct startup of a .tac file.
I have a buildbot running automated trial tests on all the services
I've written but nothing that closes the loop by building up the
services by running the tac file similarly to the way that you'd use
I've handled this problem 2 ways: 1) for almost realtime... using
twisted and .read() file as glyph mentioned and 2) used splunk and
it's functionality to send search "matching" data to a program that in
turn does http notification. This is at 5 min search intervals.
As previous posters have ment