From 6272d94847ff5ace5b0af4fa88aa435b8d75c8bd Mon Sep 17 00:00:00 2001 From: Michael Gmelin Date: Fri, 23 Feb 2024 18:52:37 +0100 Subject: [PATCH] Fix inotify read timeout This was off by a factor of 1000, leading to a lot more invocations of the loop body than necessary. --- src/documents/management/commands/document_consumer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/documents/management/commands/document_consumer.py b/src/documents/management/commands/document_consumer.py index 919530544..432ca80ba 100644 --- a/src/documents/management/commands/document_consumer.py +++ b/src/documents/management/commands/document_consumer.py @@ -342,7 +342,7 @@ class Command(BaseCommand): # If files are waiting, need to exit read() to check them # Otherwise, go back to infinite sleep time, but only if not testing if len(notified_files) > 0: - timeout = inotify_debounce + timeout = inotify_debounce * 1000 elif is_testing: timeout = self.testing_timeout_ms else: