def get_status(user_id, volume_id, path, download_url, dl_key): """Get the status of the download.""" gw = SystemGateway() try: download = gw.get_download(user_id, volume_id, path, download_url, dl_key) except errors.DoesNotExist: return UNKNOWN return get_status_from_download(user_id, download)
def get_status(user_id, volume_id, path, download_url, dl_key): """Get the status of the download.""" gw = SystemGateway() try: download = gw.get_download( user_id, volume_id, path, download_url, dl_key) except errors.DoesNotExist: return UNKNOWN return get_status_from_download(user_id, download)
def get_or_make_download(user_id, volume_id, path, download_url, dl_key): """Get or make a download if it doesn't already exist.""" gw = SystemGateway() try: download = gw.get_download(user_id, volume_id, path, download_url, dl_key) except errors.DoesNotExist: download = gw.make_download(user_id, volume_id, path, download_url, dl_key) return download
def get_or_make_download(user_id, volume_id, path, download_url, dl_key): """Get or make a download if it doesn't already exist.""" gw = SystemGateway() try: download = gw.get_download( user_id, volume_id, path, download_url, dl_key) except errors.DoesNotExist: download = gw.make_download( user_id, volume_id, path, download_url, dl_key) return download
def get_download(user_id, udf_id, file_path, download_url, download_key=None): """Get a download by its UDF, file path and download URL and key.""" gw = SystemGateway() return gw.get_download(user_id, udf_id, file_path, download_url, download_key)
def get_download(user_id, udf_id, file_path, download_url, download_key=None): """Get a download by its UDF, file path and download URL and key.""" gw = SystemGateway() return gw.get_download( user_id, udf_id, file_path, download_url, download_key)