gerrit driver - skip ignored events before they hit zookeeper
Change-Id: Idc3d0c2a1c4ceb752065d961ac84e480e3bf8415
This commit is contained in:
parent
581e755ddd
commit
bfe3bdc8f5
|
@ -230,13 +230,6 @@ class GerritEventConnector(threading.Thread):
|
||||||
event.type = data.get('type')
|
event.type = data.get('type')
|
||||||
event.uuid = data.get('uuid')
|
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
|
# This catches when a change is merged, as it could potentially
|
||||||
# have merged layout info which will need to be read in.
|
# have merged layout info which will need to be read in.
|
||||||
# Ideally this would be done with a refupdate event so as to catch
|
# Ideally this would be done with a refupdate event so as to catch
|
||||||
|
@ -1122,6 +1115,13 @@ class GerritConnection(ZKChangeCacheMixin, ZKBranchCacheMixin, BaseConnection):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def addEvent(self, data):
|
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 = {
|
event = {
|
||||||
"timestamp": time.time(),
|
"timestamp": time.time(),
|
||||||
"payload": data
|
"payload": data
|
||||||
|
|
Loading…
Reference in New Issue