jsclayton / prometheus-plex-exporter

Export metrics from your Plex Media Server
GNU Affero General Public License v3.0
117 stars 13 forks source link

Handle context cancellation to shutdown the exporter #23

Closed ThisIsAreku closed 3 weeks ago

ThisIsAreku commented 2 months ago

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 commented 1 month ago

oh, looking forward to this !

ThisIsAreku commented 3 weeks ago

@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