gerrit driver - skip ignored events before they hit zookeeper

Change-Id: Idc3d0c2a1c4ceb752065d961ac84e480e3bf8415
This commit is contained in:
Fabien Boucher 2021-12-21 11:11:40 +00:00
parent 581e755ddd
commit bfe3bdc8f5
1 changed files with 7 additions and 7 deletions

View File

@ -230,13 +230,6 @@ class GerritEventConnector(threading.Thread):
event.type = data.get('type')
event.uuid = data.get('uuid')
# NOTE(mnaser): Certain plugins fire events which end up causing
# an unrecognized event log *and* a traceback if they
# do not contain full project information, we skip them
# here to keep logs clean.
if event.type in GerritEventConnector.IGNORED_EVENTS:
return
# This catches when a change is merged, as it could potentially
# have merged layout info which will need to be read in.
# Ideally this would be done with a refupdate event so as to catch
@ -1122,6 +1115,13 @@ class GerritConnection(ZKChangeCacheMixin, ZKBranchCacheMixin, BaseConnection):
return True
def addEvent(self, data):
# NOTE(mnaser): Certain plugins fire events which end up causing
# an unrecognized event log *and* a traceback if they
# do not contain full project information, we skip them
# here to keep logs clean.
if data.get('type') in GerritEventConnector.IGNORED_EVENTS:
return
event = {
"timestamp": time.time(),
"payload": data