1
0
mirror of https://github.com/ilri/dspace-statistics-api.git synced 2024-11-14 02:27:02 +01:00
dspace-statistics-api/config.py
Alan Orth 9e942736b1
app.py: Get item statistics from SQLite database
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).
2018-09-23 16:47:00 +03:00

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: