|
7 | 7 | import requests
|
8 | 8 |
|
9 | 9 | from cromshell import log
|
| 10 | +from cromshell.metadata import command as metadata_command |
10 | 11 | from cromshell.utilities import cromshellconfig, http_utils, io_utils
|
11 | 12 |
|
12 | 13 | LOGGER = logging.getLogger(__name__)
|
@@ -57,11 +58,18 @@ def main(config, workflow_id):
|
57 | 58 | elif workflow_status == "Running":
|
58 | 59 | # Status claims this workflow is running fine, but we need to check to see
|
59 | 60 | # if there are any failed sub-processes.
|
60 |
| - # To do this, we use the `execution-status-count` logic with some filtering: |
61 |
| - # TODO : Use this as a template for the Metadata subcommand |
62 |
| - # Get execution status count and filter the metadata down: |
| 61 | + # To do this, we get the workflow metadata and search for any failures |
| 62 | + formatted_metadata_parameter = metadata_command.format_metadata_params( |
| 63 | + list_of_keys=config.SLIM_METADATA_DEFAULT_KEYS, |
| 64 | + exclude_keys=False, |
| 65 | + expand_subworkflows=True, |
| 66 | + ) |
| 67 | + |
63 | 68 | request_meta_out = requests.get(
|
64 |
| - f"{config.cromwell_api_workflow_id}/metadata?{config.slim_metadata_parameters}" |
| 69 | + f"{config.cromwell_api_workflow_id}/metadata", |
| 70 | + params=formatted_metadata_parameter, |
| 71 | + timeout=config.requests_connect_timeout, |
| 72 | + verify=config.requests_verify_certs, |
65 | 73 | )
|
66 | 74 |
|
67 | 75 | # metadata holds the workflow metadata as a dictionary
|
|
0 commit comments