Problem/Motivation

As we're doing testing on our website, we're creating and deleting content and we've run into the issue where we've deleted something while there's a notification pending to be sent out. This causes an issue in Cron (its actually in Push Framework's queue i think) and that prevents it from running until we run the edel commands to clear out the bad notifications.

The following edel commands clear out everything and fix the problem, but they also lose all the logs of notification data we might want to keep.
drush edel danse_notification_action
drush edel danse_notification
drush edel danse_event

Is there some sort of way push framework can test that the content still exists and, in the event that it doesn't, fail gracefully with a notice rather than the full error stack that happens now?

I imagine we still want the full error available in some way, but I'd also like for cron to be able to still execute successfully.

Additional feature requests with this would be the ability to individually delete bad events from the queue so we can clear them out piecemeal rather than in totality.
This could be through the UI or command line.

Thank you!

Comments

rex.barkdoll created an issue. See original summary.

  • jurgenhaas committed 27fed39 on 2.2.x
    Issue #3218315 by rex.barkdoll, jurgenhaas: Gracefully fail on a non-...
jurgenhaas’s picture

Assigned: Unassigned » jurgenhaas
Status: Active » Needs review

Hopefully, I covered the right place here, had to adjust both push_framework and danse. So please update both for testing.

As for the second part to be able to delete individual events or notifications with drush, you can already do that: the drush edel command allows you to provide a comma-separated list of entity ids for the given entity type to delete. You can get more details by just using drush edel --help

To find out ther id of a DANSE event or notification, just hover over the link in /admin/reports/danse, the shown destination url in the status bar contains the entity id of that entity.

I know, we could easily provide more convenient user interface for that part. There is already an issue for this: #3095928: Improve audit functionality - but I don't know how quickly we can around to work on this.

Most important I think that we avoid the crashes you were seeing, and I hope the latests commits are solving this.

rex.barkdoll’s picture

Thank you for this insight.

Clearing out individual DANSE entities was easy and worked. It looks like danse_notification and danse_notification_action entities have different ID's than danse_event entities. It doesn't look like there's a great way to get those to match up or figure out which ones are causing the issue.

Even though I'm updated on both DANSE and Push Framework, my cron is still getting locked up when we delete something before a notification is sent out.

From my perspective, I don't think danse_notification and danse_notification_action entities are as important to keep track of as the DANSE events, but I'd still like for all the auditing to be done at some point. We'll eventually have more stringent requirements placed on our website by a parent organization, they really want us tracking everything meticulously, so whenever there's a little more attention being asked for in the audit space, I'll add to that. For right now, I think we're in a good spot.

jurgenhaas’s picture

Status: Needs review » Fixed

  • jurgenhaas committed 27fed39 on 2.1.x
    Issue #3218315 by rex.barkdoll, jurgenhaas: Gracefully fail on a non-...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.