Skip to content

Commit

Permalink
tweak wf-s xtrig return
Browse files Browse the repository at this point in the history
  • Loading branch information
hjoliver committed Jun 12, 2024
1 parent a17959e commit fa22199
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions cylc/flow/xtriggers/workflow_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def workflow_state(
satisfied:
True if ``satisfied`` else ``False``.
result:
Dict {workflow_id, task_id, task_selector, flow_number}.
Dict {workflow_id, task_id, task_selector, flow_num}.
"""
poller = WorkflowPoller(
Expand All @@ -76,7 +76,7 @@ def workflow_state(
"workflow_id": poller.workflow_id,
"task_id": f"{poller.cycle}/{poller.task}",
"task_selector": poller.selector,
"flow_number": poller.flow_num
"flow_num": poller.flow_num
}
)
else:
Expand Down
10 changes: 5 additions & 5 deletions tests/flakyfunctional/xtriggers/01-workflow_state.t
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ contains_ok "${JOB_LOG}" << __END__
upstream_workflow_id="${WORKFLOW_NAME_UPSTREAM}"
upstream_task_id="2015/foo"
upstream_task_selector="data_ready"
upstream_flow_number="1"
upstream_flow_num="1"
__END__

# Check broadcast of xtrigger outputs is recorded: 1) in the workflow log...
Expand All @@ -71,11 +71,11 @@ contains_ok "${WORKFLOW_LOG}" << __LOG_BROADCASTS__
${LOG_INDENT}+ [2015/f1] [environment]upstream_workflow_id=${WORKFLOW_NAME_UPSTREAM}
${LOG_INDENT}+ [2015/f1] [environment]upstream_task_id=2015/foo
${LOG_INDENT}+ [2015/f1] [environment]upstream_task_selector=data_ready
${LOG_INDENT}+ [2015/f1] [environment]upstream_flow_number=1
${LOG_INDENT}+ [2015/f1] [environment]upstream_flow_num=1
${LOG_INDENT}- [2015/f1] [environment]upstream_workflow_id=${WORKFLOW_NAME_UPSTREAM}
${LOG_INDENT}- [2015/f1] [environment]upstream_task_id=2015/foo
${LOG_INDENT}- [2015/f1] [environment]upstream_task_selector=data_ready
${LOG_INDENT}- [2015/f1] [environment]upstream_flow_number=1
${LOG_INDENT}- [2015/f1] [environment]upstream_flow_num=1
__LOG_BROADCASTS__
# ... and 2) in the DB.
TEST_NAME="${TEST_NAME_BASE}-check-broadcast-in-db"
Expand All @@ -91,11 +91,11 @@ contains_ok "${NAME}" << __DB_BROADCASTS__
+|2015|f1|[environment]upstream_workflow_id|${WORKFLOW_NAME_UPSTREAM}
+|2015|f1|[environment]upstream_task_id|2015/foo
+|2015|f1|[environment]upstream_task_selector|data_ready
+|2015|f1|[environment]upstream_flow_number|1
+|2015|f1|[environment]upstream_flow_num|1
-|2015|f1|[environment]upstream_workflow_id|${WORKFLOW_NAME_UPSTREAM}
-|2015|f1|[environment]upstream_task_id|2015/foo
-|2015|f1|[environment]upstream_task_selector|data_ready
-|2015|f1|[environment]upstream_flow_number|1
-|2015|f1|[environment]upstream_flow_num|1
__DB_BROADCASTS__

purge
Expand Down

0 comments on commit fa22199

Please sign in to comment.