Vulnerable to deleted item on queue.

Bug #819860 reported by ke1g
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Singing & Dancing
New
Undecided
Unassigned

Bug Description

collective.dancing.browser.sendewsletter._assemble_messages() raises an exception if its second argument, context_path, does not exist within site. The call to site.restrictedTraverse() raises AttributeError. This isn't caught anywhere, so the rest of the queue doesn't get run either. I've patched in a try/except (actually in collective.singing.async.Job.__call__(), with an eye to figuring out how to do the failure accounting, since abandoned because I don't care), and mail is again being sent. If there's not going to be failed message accounting, the obvious place for the try/except is around the restrictedTraverse() where the except can just return a string describing the failure. If failure accounting is desired, I'll leave it to someone who knows the code to design the fix.

This seems a low priority bug since it's probably unlikely to be triggered in normal usage. I suspect that we marked the item for mailing as a test before I had email sending fully working, before, certainly, I added a clock server stanza to my zope-conf-additional, to invoke tick_and_dispatch, and the item was deleted in the interim. On the other hand, it should be possible to produce by working at it, and once there, it prevents mailing of other stuff, so some may consider it more important. The AttributeError does show up in the event log, though I happend to notice it because I was running a copy of the site in the foreground while debugging something else.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.