Skip to content

Commit

Permalink
Tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
MetRonnie committed Jun 5, 2024
1 parent f6e85f8 commit 6212284
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 16 deletions.
15 changes: 3 additions & 12 deletions cylc/flow/xtriggers/suite_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

from cylc.flow import LOG
import cylc.flow.flags
from cylc.flow.xtriggers.workflow_state import workflow_state
from cylc.flow.xtriggers.workflow_state import _workflow_state_backcompat

if not cylc.flow.flags.cylc7_back_compat:
LOG.warning(
Expand Down Expand Up @@ -72,15 +72,6 @@ def suite_state(suite, task, point, offset=None, status='succeeded',
to this xtrigger.
"""
if message is not None:
selector = message
is_message = True
else:
selector = status
is_message = False

return workflow_state(
f"{suite}//{point}/{task}:{selector}",
offset=offset, is_message=is_message,
alt_cylc_run_dir=cylc_run_dir
return _workflow_state_backcompat(
suite, task, point, offset, status, message, cylc_run_dir
)
8 changes: 4 additions & 4 deletions tests/functional/workflow-state/11-multi.t
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ install_workflow "${TEST_NAME_BASE}" "${TEST_NAME_BASE}"
# Create Cylc 7, 8 (pre-8.3.0), and 8(8.3.0+) DBs for workflow-state checking.
DBDIR="${WORKFLOW_RUN_DIR}/dbs"
for x in c7 c8a c8b; do
mkdir -p "${DBDIR}/${x}/log"
sqlite3 "${DBDIR}/${x}/log/db" < "${x}.schema"
mkdir -p "${DBDIR}/${x}/log"
sqlite3 "${DBDIR}/${x}/log/db" < "${x}.sql"
done

run_ok "${TEST_NAME_BASE}-validate" \
cylc validate "${WORKFLOW_NAME}" --set="ALT=\"${DBDIR}\""
cylc validate "${WORKFLOW_NAME}" --set="ALT=\"${DBDIR}\""

TEST_NAME="${TEST_NAME_BASE}-run"
workflow_run_ok "${TEST_NAME}" \
cylc play "${WORKFLOW_NAME}" --set="ALT=\"${DBDIR}\"" \
Expand Down

0 comments on commit 6212284

Please sign in to comment.