server/ssplanner.py
branchstable
changeset 6893 2e10337c9c2c
parent 6889 37668bf302f5
child 7118 e094b3d4eb95
equal deleted inserted replaced
6892:e73245c14516 6893:2e10337c9c2c
   643     """step consisting in deleting entities"""
   643     """step consisting in deleting entities"""
   644 
   644 
   645     def execute(self):
   645     def execute(self):
   646         """execute this step"""
   646         """execute this step"""
   647         results = self.execute_child()
   647         results = self.execute_child()
   648         todelete = frozenset(typed_eid(eid) for eid, in results)
   648         if results:
   649         session = self.plan.session
   649             todelete = frozenset(typed_eid(eid) for eid, in results)
   650         # mark eids as being deleted in session info and setup cache update
   650             session = self.plan.session
   651         # operation (register pending eids before actual deletion to avoid
   651             # mark eids as being deleted in session info and setup cache update
   652         # multiple call to glob_delete_entities)
   652             # operation (register pending eids before actual deletion to avoid
   653         op = CleanupDeletedEidsCacheOp.get_instance(session)
   653             # multiple call to glob_delete_entities)
   654         actual = todelete - op._container
   654             op = CleanupDeletedEidsCacheOp.get_instance(session)
   655         op._container |= actual
   655             actual = todelete - op._container
   656         session.repo.glob_delete_entities(session, actual)
   656             op._container |= actual
       
   657             session.repo.glob_delete_entities(session, actual)
   657         return results
   658         return results
   658 
   659 
   659 class DeleteRelationsStep(Step):
   660 class DeleteRelationsStep(Step):
   660     """step consisting in deleting relations"""
   661     """step consisting in deleting relations"""
   661 
   662