File tree Expand file tree Collapse file tree
ckan_cloud_operator/providers/solr Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -98,12 +98,15 @@ def get_collection_status(collection_name):
9898 'collection_name' : collection_name ,
9999 'solr_http_endpoint' : get_internal_http_endpoint ()}
100100 else :
101-
102- res = {'schema' : {'version' : '2.8' , 'name' : 'ckan' }}
101+ def_ver , def_name = '2.8' , 'ckan'
102+ res = {'schema' : {'version' : def_ver , 'name' : def_name }}
103103 try :
104- res = json .loads (new_output )
105- except :
106- pass
104+ res = json .loads (output )
105+ except json .decoder .JSONDecodeError as e :
106+ logs .warning (
107+ f'Not able to decode response from SOLR. Using default values for schema version/name - { def_ver } /{ def_name } \n SOLR response: \n { output } '
108+ )
109+
107110 return {'ready' : True ,
108111 'collection_name' : collection_name ,
109112 'solr_http_endpoint' : get_internal_http_endpoint (),
You can’t perform that action at this time.
0 commit comments