Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements several changes that aim to improve the system's handling of detection events and provide better debugging tools for these processes. Here are the key changes:
Refactoring of Event Type Checks: In
backends/__init__.py
, the way we check ifRELEVANT_EVENT_TYPES
is"ALL"
has been modified. Instead of comparing the entire list to the string"ALL"
, we now check if"ALL"
is an element ofRELEVANT_EVENT_TYPES
. This change allows for more flexibility in theRELEVANT_EVENT_TYPES
configuration, as it does not have to be exactly"ALL"
to be considered as such.Minor Grammar Change: In
falcon/models.py
, the logging message for when a detection event is skipped has been grammatically fixed.Incorporation of Relevant Event Types in Streaming Connection: Changes in
falcon/stream.py
addrelevant_event_types
as a parameter in theStreamingConnection
class. This allowsrelevant_event_types
to be used when establishing the connection. Now, when constructing the URL for the streaming connection, ifrelevant_event_types
is not None, it is added as a filter in the URL query parameters (&eventType=
). This change should help in reducing unnecessary network traffic by filtering out irrelevant events directly at the source.Enhanced Debugging Information: Also in
falcon/stream.py
, a new debugging log has been added to print the complete URL used for the streaming connection. This addition should assist in debugging issues related to streaming connection setup.These changes are expected to enhance the system's performance and make it easier to manage and debug.