@@ -90,26 +90,24 @@ def compare_md5sum(archive_dir):
9090 else :
9191 return True
9292
93- def verify_archive (archive , host , description , config ):
93+ def verify_archive (archive , archive_path , description , config ):
9494 """
9595 Our main worker function. This will be put into the RQ/Redis queue when the /verify endpoint gets called.
9696 Downloads the specified archive from PDC and then verifies the MD5 sums.
9797
9898 :param archive: The name of the archive we shall download
99- :param host : The host the archive was previsouly uploaded from
99+ :param archive_path : The path to the archive on PDC
100100 :param description: The unique description that was used when uploading the archive to PDC
101101 :param config: A dict containing the apps configuration
102102 :returns A JSON with the result that will be kept in the Redis queue
103103 """
104104 dest_root = config ["verify_root_dir" ]
105105 dsmc_log_dir = config ["dsmc_log_dir" ]
106106 whitelist = config ["whitelisted_warnings" ]
107- src_root = config ["pdc_root_dir" ].format (host )
108- src = os .path .join (src_root , archive )
109107 job_id = rq .get_current_job ().id
110108 dest = "{}_{}" .format (os .path .join (dest_root , archive ), job_id )
111109
112- download_ok = download_from_pdc (src , description , dest , dsmc_log_dir , whitelist )
110+ download_ok = download_from_pdc (archive_path , description , dest , dsmc_log_dir , whitelist )
113111
114112 if not download_ok :
115113 return {"state" : "error" , "msg" : "failed to properly download archive from pdc" , "path" : dest }
0 commit comments