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

Split database access into RW and RO

The indexer need to be able to write to the database, but the API only
needs to read it.
This commit is contained in:
2018-09-24 00:00:05 +03:00
parent c554404d7f
commit 89621af85d
3 changed files with 12 additions and 5 deletions

View File

@ -5,7 +5,7 @@
# https://wiki.duraspace.org/display/DSPACE/Solr
from config import SOLR_CORE
from database import database_connection
from database import database_connection_rw
from solr import solr_connection
def index_views():
@ -90,7 +90,7 @@ def index_downloads():
results_current_page += 1
db = database_connection()
db = database_connection_rw()
solr = solr_connection()
# use separate views and downloads tables so we can REPLACE INTO carelessly (ie, item may have views but no downloads)