1
0
mirror of https://github.com/ilri/dspace-statistics-api.git synced 2025-07-01 04:01:54 +02:00

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).
This commit is contained in:
2018-09-23 16:47:00 +03:00
parent ea85393b13
commit 9e942736b1
3 changed files with 30 additions and 13 deletions

View File

@ -4,4 +4,6 @@ import os
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: