Sever the forward reference from connections to their users
This will make it easier to keep connections around while the data structures that use them change (eg, during a reload). Change-Id: I465e1ca3c44ca263047f89d84197b5cf514bdfa3
This commit is contained in:
parent
765e11b657
commit
f996eb7d7a
|
@ -43,14 +43,6 @@ class BaseConnection(object):
|
|||
self.connection_name = connection_name
|
||||
self.connection_config = connection_config
|
||||
|
||||
# Keep track of the sources, triggers and reporters using this
|
||||
# connection
|
||||
self.attached_to = {
|
||||
'source': [],
|
||||
'trigger': [],
|
||||
'reporter': [],
|
||||
}
|
||||
|
||||
def onLoad(self):
|
||||
pass
|
||||
|
||||
|
@ -60,9 +52,6 @@ class BaseConnection(object):
|
|||
def registerScheduler(self, sched):
|
||||
self.sched = sched
|
||||
|
||||
def registerUse(self, what, instance):
|
||||
self.attached_to[what].append(instance)
|
||||
|
||||
def maintainCache(self, relevant):
|
||||
"""Make cache contain relevant changes.
|
||||
|
||||
|
|
|
@ -118,9 +118,6 @@ class ConnectionRegistry(object):
|
|||
driver_config, self.sched, connection
|
||||
)
|
||||
|
||||
if connection:
|
||||
connection.registerUse(dtype, driver_instance)
|
||||
|
||||
return driver_instance
|
||||
|
||||
def getSource(self, connection_name):
|
||||
|
|
Loading…
Reference in New Issue