Notifications slowing system

Forums for specific tips, techniques and example code
darrell
Posts: 6
Joined: Tue Apr 24, 2012 12:14 pm
Location: Melbourne

Re: Notifications slowing system

Postby darrell » Fri Oct 25, 2013 4:38 pm

On a separate note, there was another problem that popped up thanks to using notifications.
When cancelling a price update my code would dispose/delete the price update and send a notification to remove that price update from the list it was in. This would cause an error (4: invalid object) because the notification was being processed after the price update had been deleted. Moving the causeEvent in my code to be before the delete didn't help, the delete still occurred first. Adding an 'if global.isValidObject' call on the removal didn't help because the object wasn't valid and thus the removal would never happen.
In the end, I changed the removal userNotify method to rebuild the list instead of trying to remove the object from the list.
Rather than rebuilding the whole list, couldn't you just implement an exception handler in your userNotification method to trap the error 4, and just remove the invalid object from the list ?


Return to “Tips and Techniques”

Who is online

Users browsing this forum: No registered users and 11 guests

cron