From c7eaf21c11dc7b27a3ed3636cc4941d203eab271 Mon Sep 17 00:00:00 2001 From: Trenton H <797416+stumpylog@users.noreply.github.com> Date: Tue, 4 Mar 2025 15:06:30 -0800 Subject: [PATCH] Test out always closing the inotify --- src/documents/management/commands/document_consumer.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/documents/management/commands/document_consumer.py b/src/documents/management/commands/document_consumer.py index 36dcc7706..0e8e88b45 100644 --- a/src/documents/management/commands/document_consumer.py +++ b/src/documents/management/commands/document_consumer.py @@ -354,6 +354,6 @@ class Command(BaseCommand): except KeyboardInterrupt: logger.info("Received SIGINT, stopping inotify") finished = True - - inotify.rm_watch(descriptor) - inotify.close() + finally: + inotify.rm_watch(descriptor) + inotify.close()