mirror of
https://github.com/ilri/dspace-statistics-api.git
synced 2024-11-25 07:40:17 +01:00
Alan Orth
9e942736b1
It is much more efficient to cache view and download statistics in a database than to query Solr on demand (not to mention that it is not possible to page easily with facets in Solr). I decided to use SQLite because it is fast, native in Python 3, and doesn't require any extra steps during provisioning (assuming permissions are ok).
10 lines
301 B
Python
10 lines
301 B
Python
import os
|
|
|
|
# Check if Solr connection information was provided in the environment
|
|
SOLR_SERVER = os.environ.get('SOLR_SERVER', 'http://localhost:8080/solr')
|
|
SOLR_CORE = os.environ.get('SOLR_CORE', 'statistics')
|
|
|
|
SQLITE_DB = os.environ.get('SQLITE_DB', 'statistics.db')
|
|
|
|
# vim: set sw=4 ts=4 expandtab:
|