Committed old Anki 1.2 sync server code. It's not very generic. :-/

This commit is contained in:
David Snopek
2013-04-03 14:31:44 +01:00
commit 549d9b1d2c
9 changed files with 1171 additions and 0 deletions

12
AnkiServer/__init__.py Normal file
View File

@@ -0,0 +1,12 @@
def server_runner(app, global_conf, **kw):
""" Special version of paste.httpserver.server_runner which shuts down
the AnkiServer.deck.thread_pool on server exit. """
from paste.httpserver import server_runner as paste_server_runner
from AnkiServer.deck import thread_pool
try:
paste_server_runner(app, global_conf, **kw)
finally:
thread_pool.shutdown()