- Add web hook queue code back in. We'll remove it and turn it off after this CL goes to prod
- Make notification lookup always be by repo and its UUID, rather than the internal DB ID - Add the init script for the notification worker
This commit is contained in:
parent
1c7d72914b
commit
49801bc2c4
11 changed files with 37 additions and 56 deletions
|
@ -8,6 +8,7 @@ from endpoints.api import (RepositoryParamResource, nickname, resource, require_
|
|||
from endpoints.notificationevent import NotificationEvent
|
||||
from endpoints.notificationmethod import (NotificationMethod,
|
||||
CannotValidateNotificationMethodException)
|
||||
from endpoints.notificationhelper import build_notification_data
|
||||
from data import model
|
||||
|
||||
|
||||
|
@ -134,11 +135,7 @@ class TestRepositoryNotification(RepositoryParamResource):
|
|||
|
||||
event_info = NotificationEvent.get_event(notification.event.name)
|
||||
sample_data = event_info.get_sample_data(repository=notification.repository)
|
||||
notification_data = {
|
||||
'notification_id': notification.id,
|
||||
'repository_id': notification.repository.id,
|
||||
'event_data': sample_data
|
||||
}
|
||||
notification_data = build_notification_data(notification, sample_data)
|
||||
notification_queue.put([namespace, repository, notification.event.name],
|
||||
json.dumps(notification_data))
|
||||
|
||||
|
|
Reference in a new issue