Merge "Switch to ZooKeeperSimpleBase where possible"

This commit is contained in:
Zuul 2021-04-12 23:52:30 +00:00 committed by Gerrit Code Review
commit 38db5b1e85
2 changed files with 7 additions and 7 deletions

View File

@ -19,7 +19,7 @@ from typing import Any, Dict, List, Optional
from kazoo.client import KazooClient
from kazoo.exceptions import NoNodeError
from zuul.zk import NoClientException, ZooKeeperBase, ZooKeeperClient
from zuul.zk import NoClientException, ZooKeeperSimpleBase, ZooKeeperClient
class ZooKeeperComponentReadOnly(object):
@ -128,7 +128,7 @@ class ZooKeeperComponent(ZooKeeperComponentReadOnly):
self.kazoo_client.delete(self._path)
class ZooKeeperComponentRegistry(ZooKeeperBase):
class ZooKeeperComponentRegistry(ZooKeeperSimpleBase):
"""
ZooKeeper component registry. Each zuul component can register itself
using this registry. This will create a ephemeral zookeeper node, which

View File

@ -29,7 +29,7 @@ from kazoo.recipe.election import Election
from zuul import model
from zuul.lib.collections import DefaultKeyDict
from zuul.zk import ZooKeeperBase
from zuul.zk import ZooKeeperSimpleBase
RESULT_EVENT_TYPE_MAP = {
"BuildCompletedEvent": model.BuildCompletedEvent,
@ -70,7 +70,7 @@ class EventPrefix(enum.Enum):
TRIGGER = "300"
class GlobalEventWatcher(ZooKeeperBase):
class GlobalEventWatcher(ZooKeeperSimpleBase):
log = logging.getLogger("zuul.zk.event_queues.EventQueueWatcher")
@ -87,7 +87,7 @@ class GlobalEventWatcher(ZooKeeperBase):
self.callback()
class PipelineEventWatcher(ZooKeeperBase):
class PipelineEventWatcher(ZooKeeperSimpleBase):
log = logging.getLogger("zuul.zk.event_queues.EventQueueWatcher")
@ -135,7 +135,7 @@ class PipelineEventWatcher(ZooKeeperBase):
self.callback()
class ZooKeeperEventQueue(ZooKeeperBase, Iterable):
class ZooKeeperEventQueue(ZooKeeperSimpleBase, Iterable):
"""Abstract API for events via ZooKeeper"""
log = logging.getLogger("zuul.zk.event_queues.ZooKeeperEventQueue")
@ -254,7 +254,7 @@ class SchedulerEventQueue(ZooKeeperEventQueue):
return "{}/{}-".format(self.event_root, self.event_prefix.value)
class ManagementEventResultFuture(ZooKeeperBase):
class ManagementEventResultFuture(ZooKeeperSimpleBase):
"""Returned when a management event is put into a queue."""
log = logging.getLogger("zuul.zk.event_queues.MangementEventResultFuture")