From 91ff47167bf9ac005a08da707a6144326aa3d298 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Tue, 5 Apr 2022 23:04:57 +0200 Subject: [PATCH] Don't terminate the entities engine thread if a batch of entity records fails --- platypush/entities/_engine.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/platypush/entities/_engine.py b/platypush/entities/_engine.py index 52d7d3d4a..d88e2c9d7 100644 --- a/platypush/entities/_engine.py +++ b/platypush/entities/_engine.py @@ -54,7 +54,11 @@ class EntitiesEngine(Thread): if not msgs or self.should_stop: continue - self._process_entities(*msgs) + try: + self._process_entities(*msgs) + except Exception as e: + self.logger.error('Error while processing entity updates: ' + str(e)) + self.logger.exception(e) self.logger.info('Stopped entities engine')