MCPcopy Create free account
hub / github.com/adobe/Marinus / download_remote_files

Function download_remote_files

python3_cron_scripts/get_sonar_data_unified.py:210–229  ·  view source on GitHub ↗

Download the provided file URL

(logger, s, file_reference, data_dir, jobs_manager)

Source from the content-addressed store, hash-verified

208
209
210def download_remote_files(logger, s, file_reference, data_dir, jobs_manager):
211 """
212 Download the provided file URL
213 """
214 subprocess.run("rm " + data_dir + "*", shell=True)
215
216 dns_file = download_file(s, file_reference, data_dir)
217
218 logger.info("Downloading file")
219
220 try:
221 subprocess.run(["gunzip", dns_file], check=True)
222 except:
223 logger.error("Could not unzip file: " + dns_file)
224 jobs_manager.record_job_error()
225 exit(1)
226
227 unzipped_dns = dns_file.replace(".gz", "")
228
229 return unzipped_dns
230
231
232def check_save_location(location):

Callers 1

mainFunction · 0.70

Calls 3

record_job_errorMethod · 0.80
download_fileFunction · 0.70
runMethod · 0.45

Tested by

no test coverage detected