Don't refresh change when enqueuing an dequeue event

We only fetch the change object in order to verify that it's a real
change and to compare it to the queue item.  We don't need to have
up-to-date information about the change for that.

On the enqueue side, we do have further use of the change object
in that it is handed off to the pipeline manager for enqueing, so
we should refresh the change, just as we do when processing trigger
events.

Change-Id: Ibe835d22945c8c42c37ad97baaf0500b5f809c5d
This commit is contained in:
James E. Blair 2021-03-24 09:17:09 -07:00
parent 37b354a88c
commit 881b74d745
1 changed files with 1 additions and 1 deletions

View File

@ -981,7 +981,7 @@ class Scheduler(threading.Thread):
(trusted, project) = tenant.getProject(event.project_name)
if project is None:
raise ValueError('Unknown project %s' % event.project_name)
change = project.source.getChange(event, refresh=True)
change = project.source.getChange(event)
if change.project.name != project.name:
if event.change:
item = 'Change %s' % event.change