Skip to content

Commit

Permalink
polish
Browse files Browse the repository at this point in the history
  • Loading branch information
mlin committed Oct 30, 2020
1 parent 3ad142a commit 46ce4ef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions WDL/runtime/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def run(
ans = recv["outputs"]["directory" if directory else "file"]
assert isinstance(ans, str) and os.path.exists(ans)
logger.notice( # pyre-ignore
_(f"downloaded{' directory' if directory else ''}", uri=uri, file=ans)
_(f"downloaded{' directory' if directory else ' file'}", uri=uri, file=ans)
)
return ans

Expand Down Expand Up @@ -139,14 +139,14 @@ def run_cached(
cached = cache.get_download(uri, directory=directory, logger=logger)
if cached:
return True, cached
if cache.download_cacheable(uri):
if cache.download_cacheable(uri, directory=directory):
# run the download in a holding area under the cache directory, so that it can later be
# moved atomically into its final cache location
run_dir = os.path.join(cfg["download_cache"]["dir"], "ops")
filename = run(cfg, logger, uri, directory=directory, run_dir=run_dir, **kwargs)
return False, cache.put_download(
uri, os.path.realpath(filename), directory=directory, logger=logger
) # , directory=directory)
)


# WDL tasks for downloading a file based on its URI scheme
Expand Down
2 changes: 1 addition & 1 deletion WDL/runtime/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ def _add_downloadable_defaults(
) -> Env.Bindings[Value.Base]:
"""
Look for available File/Directory inputs that default to a string constant appearing to be a
downlodable URI. For each one, add a binding for that default to the user-supplied inputs (if
downloadable URI. For each one, add a binding for that default to the user-supplied inputs (if
not already overridden in them).
This is to trigger download of the default URIs even though we otherwise don't evaluate input
Expand Down

0 comments on commit 46ce4ef

Please sign in to comment.