summaryrefslogtreecommitdiff
path: root/zuul/driver/gerrit
diff options
context:
space:
mode:
authorFabien Boucher <fboucher@redhat.com>2021-12-21 11:11:40 +0000
committerFabien Boucher <fboucher@redhat.com>2021-12-21 11:40:43 +0000
commitbfe3bdc8f530eb8267b18ffecea21845a11ee550 (patch)
tree83710e5bccd9c6b8dd5fea1657e6c7d9bce158d8 /zuul/driver/gerrit
parent581e755ddd5419b77b885d9bb42828efc6fc371c (diff)
downloadzuul-bfe3bdc8f530eb8267b18ffecea21845a11ee550.tar.gz
gerrit driver - skip ignored events before they hit zookeeper
Change-Id: Idc3d0c2a1c4ceb752065d961ac84e480e3bf8415
Diffstat (limited to 'zuul/driver/gerrit')
-rw-r--r--zuul/driver/gerrit/gerritconnection.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/zuul/driver/gerrit/gerritconnection.py b/zuul/driver/gerrit/gerritconnection.py
index 69e651b6e..0e242a8e6 100644
--- a/zuul/driver/gerrit/gerritconnection.py
+++ b/zuul/driver/gerrit/gerritconnection.py
@@ -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