Fix the new notifications code to work
This commit is contained in:
parent
07e85324e9
commit
d709e0f64a
2 changed files with 4 additions and 3 deletions
|
@ -267,7 +267,7 @@ class BuildComponent(BaseComponent):
|
|||
trollius.async(self._build_finished(BuildJobResult.COMPLETE))
|
||||
|
||||
# Send the notification that the build has completed successfully.
|
||||
build_job.send_notification('build_success')
|
||||
self._current_job.send_notification('build_success')
|
||||
except ApplicationError as aex:
|
||||
worker_error = WorkerError(aex.error, aex.kwargs.get('base_error'))
|
||||
|
||||
|
@ -276,7 +276,8 @@ class BuildComponent(BaseComponent):
|
|||
internal_error=worker_error.is_internal_error())
|
||||
|
||||
# Send the notification that the build has failed.
|
||||
build_job.send_notification('build_failure', error_message=worker_error.public_message())
|
||||
self._current_job.send_notification('build_failure',
|
||||
error_message=worker_error.public_message())
|
||||
|
||||
# Mark the build as completed.
|
||||
if worker_error.is_internal_error():
|
||||
|
|
|
@ -32,7 +32,7 @@ class BuildJob(object):
|
|||
}
|
||||
|
||||
if error_message is not None:
|
||||
event_data['error_message'] = message
|
||||
event_data['error_message'] = error_message
|
||||
|
||||
spawn_notification(self.repo_build.repository, kind, event_data,
|
||||
subpage='build?current=%s' % self.repo_build.uuid,
|
||||
|
|
Reference in a new issue