Enable maintainConnectionCache
The maintainConnectionCache method in the scheduler is disabled with a comment to update this for tenants. It looks like it already correctly works with tenants so remove the todo comments and enable it. Also fix getting the connections in maintainConnectionCache. Change-Id: I85b7e27851fc18f77936f7d3473dc71b49e8db44
This commit is contained in:
parent
b78f65dde9
commit
517fd7741d
|
@ -585,8 +585,7 @@ class Scheduler(threading.Thread):
|
|||
|
||||
self._reenqueueTenant(old_tenant, tenant)
|
||||
|
||||
# TODOv3(jeblair): update for tenants
|
||||
# self.maintainConnectionCache()
|
||||
self.maintainConnectionCache()
|
||||
self.connections.reconfigureDrivers(tenant)
|
||||
|
||||
# TODOv3(jeblair): remove postconfig calls?
|
||||
|
@ -719,7 +718,6 @@ class Scheduler(threading.Thread):
|
|||
self.run_handler_lock.release()
|
||||
|
||||
def maintainConnectionCache(self):
|
||||
# TODOv3(jeblair): update for tenants
|
||||
relevant = set()
|
||||
for tenant in self.abide.tenants.values():
|
||||
for pipeline in tenant.layout.pipelines.values():
|
||||
|
@ -729,7 +727,7 @@ class Scheduler(threading.Thread):
|
|||
for item in pipeline.getAllItems():
|
||||
relevant.add(item.change)
|
||||
relevant.update(item.change.getRelatedChanges())
|
||||
for connection in self.connections.values():
|
||||
for connection in self.connections.connections.values():
|
||||
connection.maintainCache(relevant)
|
||||
self.log.debug(
|
||||
"End maintain connection cache for: %s" % connection)
|
||||
|
|
Loading…
Reference in New Issue