Fix regression in change tracking

Make sure we update the referenced change object on a new gerrit
event rather than waiting to remake the queue item.

This was a performance regression in the connection changes.

Change-Id: I2a967f0347352a7674deb550e34fb94d1d903e89
This commit is contained in:
Joshua Hesketh
2015-12-08 09:55:05 +11:00
parent 13cb40c3a0
commit 811e2e9334
5 changed files with 32 additions and 11 deletions

View File

@@ -43,6 +43,14 @@ 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
@@ -51,3 +59,6 @@ class BaseConnection(object):
def registerScheduler(self, sched):
self.sched = sched
def registerUse(self, what, instance):
self.attached_to[what].append(instance)