Added `_bus` property on `Plugin`.

This commit is contained in:
Fabio Manganiello 2023-11-18 10:13:09 +01:00
parent f12af08e73
commit c2f53b7771
Signed by: blacklight
GPG Key ID: D90FBA7F76362774
1 changed files with 9 additions and 0 deletions

View File

@ -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):
"""