INNER CODE UNIT · Python
gen_subscriber_id
permitio/fastapi_websocket_pubsub · fastapi_websocket_pubsub/event_notifier.py:75
def gen_subscriber_id(self):
return gen_uid()
def gen_subscription_id(self):
return gen_uid()
def _get_subscribers_lock(self):
"""
Init lock once - on current loop
"""
if self._lock is None:
self._lock = asyncio.Lock()
return self._lock
def add_channel_restriction(self, restriction_callback):
self._channel_restrictions.append(restriction_callback)
async def subscribe(