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():
|
||||
|
|
Reference in a new issue