Skip to content

Listener code - #52

Merged
NikhilDS-Rice merged 12 commits into
developmentfrom
listener_code
Apr 8, 2026
Merged

Listener code#52
NikhilDS-Rice merged 12 commits into
developmentfrom
listener_code

Conversation

@NikhilDS-Rice

Copy link
Copy Markdown
Collaborator

No description provided.

@TomekFraczek
TomekFraczek changed the base branch from main to s3-boto3 October 8, 2025 21:06
@TomekFraczek
TomekFraczek changed the base branch from s3-boto3 to development March 5, 2026 22:58

@TomekFraczek TomekFraczek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks really good. I think it's basically ready to merge

Comment thread run.py Outdated
Comment on lines +67 to +77
if args.mode == 'listen':
try:
parser.listen()
except AttributeError:
parser.error(
f"Parser '{parser.__class__.__name__}' does not support listen mode. "
f"Ensure your config uses listener mixins, not checker mixins."
)
except Exception as e:
parser.error(f"Listen mode failed: {e}", exc_info=True)
else:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this not redundant with the listen.py script?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes agreed, I have refactored argument parser in run.py and now run.py handles only checker mode and listen.py listener mode

Comment thread source/listeners/watchdog_listener.py Outdated
event['timestamp'] = now

current_state = self.load_state()
for key in ['success', 'failure', 'skipped']:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'd just make it loop through all the keys, so you don't have to care which states exist

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, updated the code accordingly

@NikhilDS-Rice NikhilDS-Rice self-assigned this Mar 19, 2026

@TomekFraczek TomekFraczek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@NikhilDS-Rice
NikhilDS-Rice merged commit 1c0b857 into development Apr 8, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants