You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: octue/cloud/events/handler.py
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -39,6 +39,7 @@ class AbstractEventHandler:
39
39
:param dict|None event_handlers: a mapping of event type names to callables that handle each type of event. The handlers must not mutate the events.
40
40
:param dict schema: the JSON schema to validate events against
41
41
:param bool include_service_metadata_in_logs: if `True`, include the SRUIDs and question UUIDs of the service revisions involved in the question to the start of the log message
42
+
:param str|None exclude_logs_containing: if provided, skip handling log messages containing this string
42
43
:param bool only_handle_result: if `True`, skip handling non-result events and only handle the "result" event when received (turning this on speeds up event handling)
43
44
:param bool validate_events: if `True`, validate events before attempting to handle them (turning this off speeds up event handling)
Copy file name to clipboardExpand all lines: octue/cloud/events/replayer.py
+7-3Lines changed: 7 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -8,15 +8,17 @@
8
8
9
9
10
10
classEventReplayer(AbstractEventHandler):
11
-
"""A replayer for events retrieved asynchronously from storage.
11
+
"""A replayer for events retrieved asynchronously from storage. Note that events aren't validated by default as the
12
+
main use case for this class is to replay already-validated events from the event store.
12
13
13
14
:param callable|None handle_monitor_message: a function to handle monitor messages (e.g. send them to an endpoint for plotting or displaying) - this function should take a single JSON-compatible python primitive
14
15
:param bool record_events: if `True`, record received events in the `received_events` attribute
15
16
:param dict|None event_handlers: a mapping of event type names to callables that handle each type of event. The handlers must not mutate the events.
16
17
:param dict|str schema: the JSON schema to validate events against
17
18
:param bool include_service_metadata_in_logs: if `True`, include the SRUIDs and question UUIDs of the service revisions involved in the question to the start of the log message
19
+
:param str|None exclude_logs_containing: if provided, skip handling log messages containing this string
18
20
:param bool only_handle_result: if `True`, skip non-result events and only handle the "result" event if present (turning this on speeds up event handling)
19
-
:param bool validate_events: if `True`, validate events before attempting to handle them (turning this off speeds up event handling)
21
+
:param bool validate_events: if `True`, validate events before attempting to handle them (this is off by default to speed up event handling)
"""Check that only one of `question_uuid`, `parent_question_uuid`, or `originator_question_uuid` are provided and
121
131
that the `kind` parameter is a valid event kind.
122
132
123
133
:param str|None question_uuid: the UUID of a question to get events for
124
134
:param str|None parent_question_uuid: the UUID of a parent question to get the sub-question events for
125
135
:param str|None originator_question_uuid: the UUID of an originator question get the full tree of events for
126
-
:param str|None kind: the kind of event to get; if `None`, all event kinds are returned
136
+
:param iter(str)|None kinds: the kinds of event to get; if `None`, all event kinds are returned
137
+
:param iter(str)|None exclude_kinds: the kind of events to exclude; if `None`, all event kinds are returned
127
138
:raise ValueError: if more than one of `question_uuid`, `parent_question_uuid`, or `originator_question_uuid` are provided or the `kind` parameter is invalid
0 commit comments