Mercurial > libervia-pubsub
comparison idavoll/generic_backend.py @ 142:812300cdbc22
Changed behaviour of retraction of items so that only the actually deleted
item ids are returned, and no exception is raised for items that didn't
actually exists.
author | Ralph Meijer <ralphm@ik.nu> |
---|---|
date | Tue, 12 Jul 2005 09:23:00 +0000 |
parents | 43102fecb14b |
children | 5b0b3f013ccc |
comparison
equal
deleted
inserted
replaced
141:d2c18d88f618 | 142:812300cdbc22 |
---|---|
319 | 319 |
320 if not persist_items: | 320 if not persist_items: |
321 raise backend.NodeNotPersistent | 321 raise backend.NodeNotPersistent |
322 | 322 |
323 d = node.remove_items(item_ids) | 323 d = node.remove_items(item_ids) |
324 d.addCallback(self._do_notify_retraction, item_ids, node.id) | 324 d.addCallback(self._do_notify_retraction, node.id) |
325 return d | 325 return d |
326 | 326 |
327 def _do_notify_retraction(self, result, item_ids, node_id): | 327 def _do_notify_retraction(self, item_ids, node_id): |
328 self.parent.dispatch({ 'item_ids': item_ids, 'node_id': node_id }, | 328 self.parent.dispatch({ 'item_ids': item_ids, 'node_id': node_id }, |
329 '//event/pubsub/retract') | 329 '//event/pubsub/retract') |
330 | 330 |
331 def purge_node(self, node_id, requestor): | 331 def purge_node(self, node_id, requestor): |
332 d = self.parent.storage.get_node(node_id) | 332 d = self.parent.storage.get_node(node_id) |