Commit 9c9a51f2 authored by katharina.berger's avatar katharina.berger

bugfix

parent 9119c693
......@@ -11,7 +11,6 @@ import re
from utils import query_solr, update_solr, query_esgf, send_mail, get_list_of_shards, run_esgmapfile, query_for_facet
from config import Log, Config
from ESGConfigParser import SectionParser, interpolate
from pyesgf.search import SearchConnection
# URLs
# local master Solr that will be checked and updated
......@@ -237,7 +236,7 @@ def create_mapfiles(log, project, infile, outdir, config, max_processes, recipie
esgmapfile_logfile.close()
def check_consistency_replcia(log, config, project, input_directory, output_directory, recipients=None):
def check_consistency_replica(log, config, project, input_directory, output_directory, recipients=None):
"""
Check data on disk against publication of original data in ESGF, move complete datasets to output_directory
"""
......@@ -261,6 +260,7 @@ def check_consistency_replcia(log, config, project, input_directory, output_dire
else:
remote_slave_solr_url = 'https://%s/solr' % index_node
log.info("Querying Solr=%s for file checksums for dataset %s " % (remote_slave_solr_url, instance_id))
dataset_id = '%s|%s' % (instance_id, data_node)
query1 = ('dataset_id:%s' % dataset_id)
docs1 = query_solr(log, query1, fields, solr_url=remote_slave_solr_url, solr_core='files')
number_of_files_sa = len(docs1)
......@@ -379,7 +379,8 @@ def main(argv):
elif create_mapfiles:
create_mapfiles(log, project, list_of_ids, output_folder, config, max_processes, recipients=recipients)
elif check_mapfiles:
check_consistency_replcia(log, config, project, scan_directory, output_folder, recipients=recipients)
check_consistency_replica(log, config, project, scan_directory, output_folder, recipients=recipients)
if __name__ == '__main__':
main(sys.argv[1:])
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment