Merge "Fix job stop info log print duplicately"

This commit is contained in:
Jenkins 2017-05-15 16:38:29 +00:00 committed by Gerrit Code Review
commit a9f529937f
1 changed files with 2 additions and 1 deletions

View File

@ -307,7 +307,8 @@ class Job(object):
next_event = job_doc['job_schedule'].get('event', '')
while next_event:
if next_event == Job.STOP_EVENT:
LOG.info('JOB {0} event: STOP'.format(self.id))
if isinstance(self.state(), StopState):
LOG.info('JOB {0} event: STOP'.format(self.id))
next_event = self.state.stop(self, job_doc)
elif next_event == Job.START_EVENT:
LOG.info('JOB {0} event: START'.format(self.id))