Merge "Allow monitoring length of connection event queues"

This commit is contained in:
Zuul
2021-05-21 19:44:42 +00:00
committed by Gerrit Code Review
9 changed files with 43 additions and 0 deletions

View File

@@ -1524,6 +1524,9 @@ class GerritConnection(BaseConnection):
self._stop_ref_watcher_thread()
self._stop_event_connector()
def getEventQueue(self):
return getattr(self, "event_queue", None)
def _stop_watcher_thread(self):
if self.watcher_thread:
self.watcher_thread.stop()

View File

@@ -2208,6 +2208,9 @@ class GithubConnection(CachedBranchConnection):
def getWebController(self, zuul_web):
return GithubWebController(zuul_web, self)
def getEventQueue(self):
return getattr(self, "event_queue", None)
def validateWebConfig(self, config, connections):
if 'webhook_token' not in self.connection_config:
raise Exception(

View File

@@ -415,6 +415,9 @@ class GitlabConnection(CachedBranchConnection):
def getWebController(self, zuul_web):
return GitlabWebController(zuul_web, self)
def getEventQueue(self):
return getattr(self, "event_queue", None)
def getProject(self, name):
return self.projects.get(name)

View File

@@ -540,6 +540,9 @@ class PagureConnection(BaseConnection):
def getWebController(self, zuul_web):
return PagureWebController(zuul_web, self)
def getEventQueue(self):
return getattr(self, "event_queue", None)
def validateWebConfig(self, config, connections):
return True