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

event-broker: Disable inotify when no subscribers are available #45

Merged
merged 2 commits into from
Apr 4, 2024

Conversation

ueno
Copy link
Contributor

@ueno ueno commented Nov 26, 2023

When no subscribers are available, event-broker doesn't need to
monitor the log file. This stops the monitoring when the last
subscriber leaves and restart it upon a new subscriber being
connected.

This also adds handling of Ctrl-C to stop the deamon if it is not
activated through systemd.

@ueno ueno force-pushed the wip/stop-inotify branch 2 times, most recently from 8aeb858 to 7ceed2a Compare November 29, 2023 08:34
@ueno ueno changed the title event-broker: Shut down activated process where possible event-broker: Disable inotify when no subscribers are available Nov 29, 2023
@ueno ueno force-pushed the wip/stop-inotify branch 2 times, most recently from 8fc2832 to 3c955a4 Compare April 1, 2024 08:08
@ueno
Copy link
Contributor Author

ueno commented Apr 1, 2024

@t184256 @neverpanic This one also passed the CI; could you take a look?

Signed-off-by: Daiki Ueno <dueno@redhat.com>
@ueno ueno force-pushed the wip/stop-inotify branch from 3c955a4 to 78c9c9b Compare April 1, 2024 08:51
@ueno ueno requested a review from simo5 April 3, 2024 23:21
Copy link
Contributor

@t184256 t184256 left a comment

Choose a reason for hiding this comment

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

Reviewed, haven't found much.

event-broker/src/main.rs Outdated Show resolved Hide resolved
When no subscribers are available, event-broker doesn't need to
monitor the log file.  This stops the monitoring when the last
subscriber leaves and restart it upon a new subscriber being
connected.

This also adds handling of Ctrl-C to stop the deamon if it is not
activated through systemd.

Signed-off-by: Daiki Ueno <dueno@redhat.com>
@ueno ueno force-pushed the wip/stop-inotify branch from 78c9c9b to f943cba Compare April 4, 2024 19:16
@ueno ueno merged commit 6852844 into latchset:main Apr 4, 2024
6 checks passed
@ueno
Copy link
Contributor Author

ueno commented Apr 4, 2024

Thank you for the review!

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.

None yet

2 participants