- 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
|
@ -22,9 +22,11 @@ logger = logging.getLogger(__name__)
|
|||
|
||||
class NotificationWorker(Worker):
|
||||
def process_queue_item(self, job_details):
|
||||
notification_id = job_details['notification_id'];
|
||||
notification = model.lookup_repo_notification(notification_id)
|
||||
|
||||
notification_uuid = job_details['notification_uuid'];
|
||||
repo_namespace = job_details['repository_namespace']
|
||||
repo_name = job_details['repository_name']
|
||||
|
||||
notification = model.get_repo_notification(repo_namespace, repo_name, notification_uuid)
|
||||
if not notification:
|
||||
# Probably deleted.
|
||||
return True
|
||||
|
|
Reference in a new issue