Update package versions.

Do not use Path in schemas (causes issues with empty paths).
Change how notifications are handled.
Run tests with Python 3.9
This commit is contained in:
grossmj committed 2020-11-11 17:18:41 +10:30
1 parent bf19da1dc2
commit acc5c7ebfa
26 files changed
+121 -134

No files matched your search

+6 -2
View File
@@ -36,10 +36,13 @@ class NotificationManager:
Use it with Python with
"""
queue = NotificationQueue()
self._listeners.add(queue)
yield queue
self._listeners.remove(queue)
try:
yield queue
finally:
self._listeners.remove(queue)
def emit(self, action, event, **kwargs):
"""
@@ -49,6 +52,7 @@ class NotificationManager:
:param event: Event to send
:param kwargs: Add this meta to the notification (project_id for example)
"""
for listener in self._listeners:
listener.put_nowait((action, event, kwargs))