Modify igwn alert listener error handling to allow graceful shutdown
Compare changes
Files
2+ 30
− 26
@@ -35,33 +35,38 @@ class IGWNAlertClient(client):
@@ -113,9 +118,8 @@ class Receiver(IGWNAlertBootStep):
Maintenance will be performed on git.ligo.org, containers.ligo.org, and docs.ligo.org on Tuesday 22 April 2025 starting at approximately 9am PDT. It is expected to take around 30 minutes and there will be several periods of downtime throughout the maintenance. Please address any comments, concerns, or questions to the helpdesk. This maintenance will be upgrading the GitLab database in order to be ready for the migration.
I think this MR fixes #554. I think two things were going wrong: One, I think switching from using a context manager (with blah.open() as s
) to opening and closing the stream_obj
had a little thinko, specifically I think the stream_obj
just needed to be closed in the receiver's stop
method
instead of going in and trying to manually stop that object's private consumer object. Secondly, I think when the stream object is closed in the stop method, the try except clause in the while self.running
loop needs to catch it the error and just pass to let the while
loop exit (similar to what we found in !1278 (merged))