buildman: spawn_notification w/ attrdict
This commit is contained in:
parent
07e23a34ed
commit
9b67fff78f
1 changed files with 8 additions and 1 deletions
|
@ -5,6 +5,7 @@ from cachetools import lru_cache
|
||||||
from endpoints.notificationhelper import spawn_notification
|
from endpoints.notificationhelper import spawn_notification
|
||||||
from data import model
|
from data import model
|
||||||
from util.imagetree import ImageTree
|
from util.imagetree import ImageTree
|
||||||
|
from util.morecollections import AttrDict
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -52,7 +53,13 @@ class BuildJob(object):
|
||||||
if error_message is not None:
|
if error_message is not None:
|
||||||
event_data['error_message'] = error_message
|
event_data['error_message'] = error_message
|
||||||
|
|
||||||
spawn_notification(self.repo_build.repository, kind, event_data,
|
# TODO(jzelinskie): remove when more endpoints have been converted to using
|
||||||
|
# interfaces
|
||||||
|
repo = AttrDict({
|
||||||
|
'namespace_name': self.repo_build.repository.namespace_user.username,
|
||||||
|
'name': self.repo_build.repository.name,
|
||||||
|
})
|
||||||
|
spawn_notification(repo, kind, event_data,
|
||||||
subpage='build/%s' % self.repo_build.uuid,
|
subpage='build/%s' % self.repo_build.uuid,
|
||||||
pathargs=['build', self.repo_build.uuid])
|
pathargs=['build', self.repo_build.uuid])
|
||||||
|
|
||||||
|
|
Reference in a new issue