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:
@ -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)
|
||||
|
Reference in New Issue
Block a user