1
0
mirror of https://github.com/ilri/dspace-statistics-api.git synced 2024-11-22 14:25:01 +01:00

dspace_statistics_api/indexer.py: Fix minor issues raised by flake8

This commit is contained in:
Alan Orth 2019-11-27 12:12:05 +02:00
parent 3540ce328b
commit eeb8e6bba1
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9

View File

@ -31,7 +31,6 @@
from .config import SOLR_SERVER
from .database import DatabaseManager
import json
import psycopg2.extras
import re
import requests
@ -146,7 +145,7 @@ def index_views():
'shards': shards,
'rows': 0,
'wt': 'json',
'json.nl': 'map' # return facets as a dict instead of a flat list
'json.nl': 'map' # return facets as a dict instead of a flat list
}
solr_url = SOLR_SERVER + '/statistics/select'
@ -172,7 +171,7 @@ def index_views():
def index_downloads():
# get the total number of distinct facets for items with at least 1 download
solr_query_params= {
solr_query_params = {
'q': 'type:0',
'fq': 'isBot:false AND statistics_type:view AND bundleName:ORIGINAL',
'facet': 'true',
@ -225,7 +224,7 @@ def index_downloads():
'shards': shards,
'rows': 0,
'wt': 'json',
'json.nl': 'map' # return facets as a dict instead of a flat list
'json.nl': 'map' # return facets as a dict instead of a flat list
}
solr_url = SOLR_SERVER + '/statistics/select'