This commit is contained in:
2026-01-25 18:38:40 +03:00
parent 536698c9cc
commit 08fec0609f

View File

@@ -53,6 +53,13 @@ class MessageProcessor:
self._dropped_count = 0
self._queue_full_warnings = 0
# Инициализируем обработчики
if handlers is None:
handlers = self._create_default_handlers()
self.handlers: List[BaseHandler] = []
self._init_handlers(handlers)
@property
def processed_count(self) -> int:
with self._stats_lock:
@@ -76,13 +83,6 @@ class MessageProcessor:
with self._stats_lock:
self._dropped_count += count
self._queue_full_warnings += count
# Инициализируем обработчики
if handlers is None:
handlers = self._create_default_handlers()
self.handlers: List[BaseHandler] = []
self._init_handlers(handlers)
def _create_default_handlers(self) -> List[BaseHandler]:
"""