mirror of
https://github.com/ilri/dspace-statistics-api.git
synced 2024-11-25 15:48:20 +01:00
Alan Orth
2f342be948
Instead of opening one global persistent database connection when the application I am now abstracting it to a class that I can use in combination with Python's "with" context. Both connections and cursors are kept for the context of each "with" block and closed automatically when exiting. See: https://alysivji.github.io/managing-resources-with-context-managers-pythonic.html See: http://initd.org/psycopg/docs/connection.html#connection.close |
||
---|---|---|
.. | ||
docs | ||
__init__.py | ||
app.py | ||
config.py | ||
database.py | ||
indexer.py | ||
solr.py |