From c2f53b77715eb537f398c4f6bc99c29f6cc24521 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sat, 18 Nov 2023 10:13:09 +0100 Subject: [PATCH] Added `_bus` property on `Plugin`. --- platypush/plugins/__init__.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/platypush/plugins/__init__.py b/platypush/plugins/__init__.py index e3db3c777..8ac86a704 100644 --- a/platypush/plugins/__init__.py +++ b/platypush/plugins/__init__.py @@ -101,6 +101,15 @@ class Plugin(EventGenerator, ExtensionWithManifest): # lgtm [py/missing-call-to assert redis, 'db plugin not initialized' return redis + @property + def _bus(self): + """ + :return: The reference to the :class:`platypush.bus.Bus`. + """ + from platypush.context import get_bus + + return get_bus() + @property def _entities(self): """