Commit 54b1f1d6 authored by katharina.berger's avatar katharina.berger

test

parent f9014b11
......@@ -210,7 +210,7 @@ def unpublish_retracted(log,
for doc in docs_replica:
replica_list.add(doc['instance_id'])
replica_list_tmp = replica_list
replica_list_tmp = set()
# counter
num_datasets_unpublished = 0
......@@ -219,7 +219,6 @@ def unpublish_retracted(log,
# query all remote index nodes for at DKRZ published replica
index_nodes, master_solr_dict = get_list_of_shards(log, config, esgf_index_node_url)
for index_node in index_nodes:
replica_list = replica_list_tmp
for instance_id in replica_list:
try:
if index_node in master_solr_dict:
......@@ -235,12 +234,14 @@ def unpublish_retracted(log,
solr_core='datasets')
if len(docs1) > 0:
# remove id from list
replica_list_tmp.remove(instance_id)
if docs1[0]['retracted']:
list_retracted.write('%s\n' % '#20'.join(instance_id.split('.v20')))
else:
replica_list_tmp.add(instance_id)
except:
log.error("Error querying index node %s" % remote_slave_solr_url)
replica_list = replica_list_tmp
# datasets that are unpublished using '--delete'
for instance_id in replica_list:
......
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