Skip to content

Commit

Permalink
ENH: Add exclude_logs_containing to EventReplayer
Browse files Browse the repository at this point in the history
skipci
  • Loading branch information
cortadocodes committed Aug 5, 2024
1 parent 188966a commit 49bd367
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions octue/cloud/events/replayer.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class EventReplayer(AbstractEventHandler):
: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.
:param dict|str schema: the JSON schema to validate events against
: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
:param str|None exclude_logs_containing: if provided, skip handling log messages containing this string
: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)
:param bool validate_events: if `True`, validate events before attempting to handle them (this is off by default to speed up event handling)
:return None:
Expand All @@ -27,6 +28,7 @@ def __init__(
event_handlers=None,
schema=SERVICE_COMMUNICATION_SCHEMA,
include_service_metadata_in_logs=True,
exclude_logs_containing=None,
only_handle_result=False,
validate_events=False,
):
Expand All @@ -46,6 +48,7 @@ def __init__(
event_handlers=event_handlers,
schema=schema,
include_service_metadata_in_logs=include_service_metadata_in_logs,
exclude_logs_containing=exclude_logs_containing,
only_handle_result=only_handle_result,
validate_events=validate_events,
)
Expand Down

0 comments on commit 49bd367

Please sign in to comment.