Skip to content

Commit

Permalink
some TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
burnout87 committed May 27, 2024
1 parent 15d70e9 commit b50b6f6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions cdci_data_analysis/analysis/instrument.py
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,7 @@ def set_input_products_from_fronted(self, input_file_path, par_dic, verbose=Fals

def update_par_dic_with_uploaded_files(self, par_dic, uploaded_files_obj, products_url, bind_host, bind_port):
if validators.url(products_url):
# TODO remove the dispatch-data part, better to have it extracted from the configuration file
basepath = os.path.join(products_url, 'dispatch-data/download_file')
else:
basepath = os.path.join(f"http://{bind_host}:{bind_port}", 'download_file')
Expand Down
2 changes: 2 additions & 0 deletions cdci_data_analysis/flask_app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ def run_api_instr_list():
'\'/instr-list\' endpoint. Please use this one in the future.\n')

if app.config['conf'].products_url is not None and validators.url(app.config['conf'].products_url):
# TODO remove the dispatch-data part, better to have it extracted from the configuration file
redirection_url = os.path.join(app.config['conf'].products_url, 'dispatch-data/instr-list')
if request.args:
args_request = urlencode(request.args)
Expand Down Expand Up @@ -160,6 +161,7 @@ def download_products():
@app.route("/download_file", methods=['POST', 'GET', 'HEAD'])
def download_file():
if app.config['conf'].products_url is not None and validators.url(app.config['conf'].products_url):
# TODO remove the dispatch-data part, better to have it extracted from the configuration file
redirection_url = os.path.join(app.config['conf'].products_url, 'dispatch-data/download_products')
if request.args:
args_request = urlencode(request.args)
Expand Down

0 comments on commit b50b6f6

Please sign in to comment.