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

Handle context cancellation to shutdown the exporter #23

Merged
merged 1 commit into from
Aug 21, 2024

Conversation

ThisIsAreku
Copy link
Contributor

Hello !
I've added context to handle the ctrl+c interrupt across the app

This gracefully close the metrics http server and the plex event websocket.

This is also a workaround for #6 and #16 as it terminate the program if there is a error on the websocket connection

@johntdyer
Copy link

oh, looking forward to this !

@ThisIsAreku
Copy link
Contributor Author

@jsclayton can you review this please ?

@johntdyer Until it's merged I've built and pushed this branch on my fork, so you can use this docker image ghcr.io/thisisareku/prometheus-plex-exporter:latest

@jsclayton jsclayton merged commit 0fe3f9c into jsclayton:main Aug 21, 2024
6 checks passed
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.

3 participants