-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #128 from kbase/dev-service
Download files to NERSC on job submission
- Loading branch information
Showing
8 changed files
with
119 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
""" | ||
A module for determining paths for callback URLs for the service. | ||
""" | ||
|
||
|
||
_CALLBACK = "callback" | ||
_DOWNLOAD_COMPLETE = "download" | ||
|
||
|
||
def get_download_complete_callback(root_url: str = None, job_id: str = None): | ||
""" | ||
Get a url or path for a service callback to communicate that a download is complete. | ||
root_url - prepend the path with the given root url. | ||
job_id - suffix the path with a job ID. | ||
""" | ||
cb = [root_url] if root_url else [] | ||
cb += [_CALLBACK, _DOWNLOAD_COMPLETE] | ||
cb += [job_id] if job_id else [] | ||
return "/".join(cb) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# TODO TEST add tests | ||
|
||
from cdmtaskservice import callback_url_paths # @UnusedImport | ||
|
||
|
||
def test_noop(): | ||
pass |