Remove stop method from reporters, sources, triggers
It still remains in the drivers that the connections utilize. Change-Id: Ie6efb57af297fbd546eed3e1104299b2e1a5205e
This commit is contained in:
parent
14abdf44c0
commit
93bdde8551
|
@ -33,9 +33,6 @@ class BaseReporter(object):
|
|||
def setAction(self, action):
|
||||
self._action = action
|
||||
|
||||
def stop(self):
|
||||
"""Stop the reporter."""
|
||||
|
||||
@abc.abstractmethod
|
||||
def report(self, source, pipeline, item):
|
||||
"""Send the compiled report message."""
|
||||
|
|
|
@ -238,7 +238,6 @@ class Scheduler(threading.Thread):
|
|||
|
||||
def stop(self):
|
||||
self._stopped = True
|
||||
self._unloadDrivers()
|
||||
self.stopConnections()
|
||||
self.wake_event.set()
|
||||
|
||||
|
@ -285,16 +284,6 @@ class Scheduler(threading.Thread):
|
|||
for connection_name, connection in self.connections.items():
|
||||
connection.onStop()
|
||||
|
||||
def _unloadDrivers(self):
|
||||
for trigger in self.triggers.values():
|
||||
trigger.stop()
|
||||
for tenant in self.abide.tenants.values():
|
||||
for pipeline in tenant.layout.pipelines.values():
|
||||
pipeline.source.stop()
|
||||
for action in self._reporter_actions.values():
|
||||
for reporter in pipeline.__getattribute__(action):
|
||||
reporter.stop()
|
||||
|
||||
def _getDriver(self, dtype, connection_name, driver_config={}):
|
||||
# Instantiate a driver such as a trigger, source or reporter
|
||||
# TODO(jhesketh): Make this list dynamic or use entrypoints etc.
|
||||
|
@ -801,7 +790,6 @@ class Scheduler(threading.Thread):
|
|||
self.config = event.config
|
||||
try:
|
||||
self.log.debug("Performing reconfiguration")
|
||||
self._unloadDrivers()
|
||||
abide = self._parseAbide(
|
||||
self.config.get('zuul', 'tenant_config'), self.connections)
|
||||
for tenant in abide.tenants.values():
|
||||
|
|
|
@ -33,9 +33,6 @@ class BaseSource(object):
|
|||
self.connection = connection
|
||||
self.projects = {}
|
||||
|
||||
def stop(self):
|
||||
"""Stop the source."""
|
||||
|
||||
@abc.abstractmethod
|
||||
def getRefSha(self, project, ref):
|
||||
"""Return a sha for a given project ref."""
|
||||
|
|
|
@ -28,9 +28,6 @@ class BaseTrigger(object):
|
|||
self.sched = sched
|
||||
self.connection = connection
|
||||
|
||||
def stop(self):
|
||||
"""Stop the trigger."""
|
||||
|
||||
@abc.abstractmethod
|
||||
def getEventFilters(self, trigger_conf):
|
||||
"""Return a list of EventFilter's for the scheduler to match against.
|
||||
|
|
Loading…
Reference in New Issue