Skip to content

Commit

Permalink
Address review feedback.
Browse files Browse the repository at this point in the history
  • Loading branch information
hjoliver committed Aug 13, 2019
1 parent 5bbdf57 commit 1c95277
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/cylc/xtrigger_mgr.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,7 @@ def satisfy_xtriggers(self, itask, proc_pool):
if wall_clock(*ctx.func_args, **ctx.func_kwargs):
itask.state.xtriggers[label] = True
self.sat_xtrig[sig] = {}
LOG.info('clock xtrigger satisfied: %s = %s' % (
label, str(ctx)))
LOG.info('xtrigger satisfied: %s = %s' % (label, sig))
continue
# General case: asynchronous xtrigger function call.
if sig in self.sat_xtrig:
Expand Down Expand Up @@ -275,5 +274,6 @@ def callback(self, ctx):
return
LOG.debug('%s: returned %s' % (sig, results))
if satisfied:
LOG.info('xtrigger satisfied: %s = %s' % (ctx.label, sig))
self.pflag = True
self.sat_xtrig[sig] = results
11 changes: 9 additions & 2 deletions tests/xtriggers/03-sequence.t
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,24 @@ init_suite "${TEST_NAME_BASE}" << '__SUITE_RC__'
e1 = echo(name='bob')
e2 = echo(name='alice')
[[dependencies]]
[[[R1]]]
graph = "start"
[[[R/^/P2Y]]]
graph = "@e1 => foo"
[[[R/^+P1Y/P2Y]]]
graph = "@e2 => foo"
[runtime]
[[start]]
[[foo]]
__SUITE_RC__

run_ok "${TEST_NAME_BASE}-val" cylc validate 'suite.rc'

# Run suite; it will stall waiting on the never-satisfied xtriggers.
cylc run "${SUITE_NAME}"

sleep 5
# Use "start" succeed as a proxy for suite initialization completed.
LOG="${SUITE_RUN_DIR}/log/suite/log"
poll "! egrep -q 'start.2025.*succeeded' '${LOG}' 2>'/dev/null'"

cylc show "${SUITE_NAME}" foo.2025 | egrep '^ o' > foo.2025.log
cylc show "${SUITE_NAME}" foo.2026 | egrep '^ o' > foo.2026.log
Expand All @@ -61,3 +67,4 @@ cmp_ok foo.2026.log - <<__END__
__END__

cylc stop --now "${SUITE_NAME}"
purge_suite "${SUITE_NAME}"

0 comments on commit 1c95277

Please sign in to comment.