Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log task event handlers as INFO. #5884

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 additions & 6 deletions cylc/flow/task_events_mgr.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,14 @@ def log_task_job_activity(ctx, workflow, point, name, submit_num=None):
# directory. In this case, just send the information to the log.
LOG.exception(exc)
LOG.info(ctx_str)
if ctx.cmd and ctx.ret_code:
LOG.error(ctx_str)
elif ctx.cmd:
LOG.debug(ctx_str)
if ctx.cmd:
if ctx.ret_code:
LOG.error(ctx_str)
else:
LOG.info(
f'Event {point}/{name}/{submit_num:02d} "{ctx.cmd_key[0][1]}"'
f" {ctx.cmd_key[0][0]}: succeeded"
)


class EventData(Enum):
Expand Down Expand Up @@ -465,8 +469,8 @@ def process_events(self, schd: 'Scheduler') -> None:
if not timer.is_timeout_set():
if timer.next() is None:
LOG.warning(
f"{point}/{name}/{submit_num:02d}"
f" handler:{key1[0]} for task event:{key1[1]} failed"
f'Event {point}/{name}/{submit_num:02d} "{key1[1]}"'
f" {key1[0]}: failed"
)
self.remove_event_timer(id_key)
continue
Expand Down Expand Up @@ -499,6 +503,11 @@ def process_events(self, schd: 'Scheduler') -> None:
timer.set_waiting()
if timer.ctx.ctx_type == self.HANDLER_CUSTOM:
# Run custom event handlers on their own
LOG.info(
f"Event {point}/{name}/{submit_num:02d}"
f' "{timer.ctx.key[1]}" {timer.ctx.key[0]}:'
f" {timer.ctx.cmd}"
)
self.proc_pool.put_command(
SubProcContext(
(key1, submit_num),
Expand Down
Loading