Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
anawas committed Nov 26, 2024
2 parents 9749593 + b8868e0 commit 4f5910d
Show file tree
Hide file tree
Showing 11 changed files with 231 additions and 65 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,5 @@ js9.fits
test-dispatcher-conf-with-gallery.yaml
tests/oda-ontology.ttl
tests/request_files
tests/local_request_files
tests/local_request_files
.lock_*
11 changes: 5 additions & 6 deletions cdci_data_analysis/analysis/instrument.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ def run_query(self, product_type,
job.set_done()
if query_out.status_dictionary['status'] == 0:
query_out.set_done(message='dry-run',job_status=job.status)
query_out.set_instrument_parameters(self.get_parameters_list_as_json(prod_name=product_type))
query_out.set_instrument_parameters(self.get_parameters_list_jsonifiable(prod_name=product_type))
else:
if query_out.status_dictionary['status'] == 0:
query_out = QueryOutput()
Expand Down Expand Up @@ -593,7 +593,7 @@ def show_parameters_list(self):
_query.show_parameters_list()
print("-------------")

def get_parameters_list_as_json(self, add_src_query=True, add_instr_query=True, prod_name=None):
def get_parameters_list_jsonifiable(self, add_src_query=True, add_instr_query=True, prod_name=None):

l=[{'instrumet':self.name}]
l.append({'prod_dict':self.query_dictionary})
Expand All @@ -608,7 +608,7 @@ def get_parameters_list_as_json(self, add_src_query=True, add_instr_query=True,
if isinstance(_query, ProductQuery) and prod_name is not None and _query.name!=self.query_dictionary[prod_name]:
continue

l.append(_query.get_parameters_list_as_json(prod_dict=self.query_dictionary))
l.append(_query.get_parameters_list_jsonifiable(prod_dict=self.query_dictionary))

return l

Expand Down Expand Up @@ -715,9 +715,8 @@ def update_par_dic_with_uploaded_files(self, par_dic, uploaded_files_obj, produc
else:
basepath = os.path.join(f"http://{bind_host}:{bind_port}", 'download_file')
for f in uploaded_files_obj:
dpars = urlencode(dict(file_list=uploaded_files_obj[f],
_is_mmoda_url=True,
return_archive=False))
dict_args = dict(file_list=uploaded_files_obj[f], _is_mmoda_url=True, return_archive=False)
dpars = urlencode(dict_args)
download_file_url = f"{basepath}?{dpars}"
par_dic[f] = download_file_url

Expand Down
Loading

0 comments on commit 4f5910d

Please sign in to comment.