]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
suricata-reporter: Don't let workers terminate if something goes wrong
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 6 Aug 2025 16:00:02 +0000 (17:00 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 3 Sep 2025 17:42:00 +0000 (18:42 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/suricata/suricata-reporter

index 6b35e4c2a25cbb5b0ea22e689780eb9b3b364f32..1a055717c0db02118ff78069c8143d6656b04eee 100644 (file)
@@ -287,7 +287,12 @@ class Worker(multiprocessing.Process):
                        #log.debug("Received event in worker %s: %s" % (self.pid, event))
 
                        # Process the event
-                       self.process(event)
+                       try:
+                               self.process(event)
+
+                       # Log any exceptions, but keep going
+                       except Exception as e:
+                               log.error("Failed to process: %s" % e)
 
                # Optimize the database before exiting
                log.debug("Optimizing the database")