Closed Bug 1132544 Opened 9 years ago Closed 9 years ago

Notifications: Push notifications don't send in response to Actions

Categories

(support.mozilla.org :: General, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mythmon, Assigned: mythmon)

References

Details

(Whiteboard: u=api c=notifications p=2 s=2015.3)

Here is how the notification system is supposed to work:

1 Something happens.
2 An Action object is created.
3 A signal handler fires for the Action creation. It determines which, if any, users should be notified by that Action, and creates a Notification object for each.
4 A signal handler fires for the Notification being saved, and invokes a series of notifiers. One of these notifiers is the SimplePush notifier.

What works:

Steps 1, 2, and 3 work together. When something happens, a notification is created if that is appropriate.

Step 4 also works. If a notification is created in isolation, and PushNotification is sent.

What does not work is that when something happens, even though steps 1, 2 and 3 happen, step 4 does not happen.

My current theory is that there is some sort of block preventing actions taken in a signal handler or in celery (where these signal handlers run) from triggering more signal handlers.

This is blocking buddyup.
This turned out to be easier than expected. In the signal processor for Actions, the Notifications were being created with `bulk_create`, which does not call signal handlers. Since signal handlers are vital, I switched to the slower individual creation. It shouldn't be a big deal, and it fixes the problem.

PR: https://github.com/mozilla/kitsune/pull/2364
Status: NEW → ASSIGNED
Fixing the sprint. It is 2015, not 2014.
Whiteboard: u=api c=notifications p=2 s=2014.3 → u=api c=notifications p=2 s=2015.3
Landed: https://github.com/mozilla/kitsune/commit/f92351d8f3d4cc2ab7ac31f5af567cd97b98ea1b
Deployed to stage.
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Blocks: 1061574
You need to log in before you can comment on or make changes to this bug.