668 attrs = {'eid': entity.eid, 'mtime': datetime.now()} |
668 attrs = {'eid': entity.eid, 'mtime': datetime.now()} |
669 self.doexec(session, self.sqlgen.update('entities', attrs, ['eid']), attrs) |
669 self.doexec(session, self.sqlgen.update('entities', attrs, ['eid']), attrs) |
670 |
670 |
671 def delete_info(self, session, entity, uri, extid): |
671 def delete_info(self, session, entity, uri, extid): |
672 """delete system information on deletion of an entity: |
672 """delete system information on deletion of an entity: |
|
673 * update the fti |
673 * remove record from the entities table |
674 * remove record from the entities table |
674 * transfer it to the deleted_entities table if the entity's type is |
675 * transfer it to the deleted_entities table if the entity's type is |
675 multi-sources |
676 multi-sources |
676 """ |
677 """ |
|
678 self.fti_unindex_entity(session, entity.eid) |
677 attrs = {'eid': entity.eid} |
679 attrs = {'eid': entity.eid} |
678 self.doexec(session, self.sqlgen.delete('entities', attrs), attrs) |
680 self.doexec(session, self.sqlgen.delete('entities', attrs), attrs) |
679 if not entity.__regid__ in self.multisources_etypes: |
681 if not entity.__regid__ in self.multisources_etypes: |
680 return |
682 return |
681 if extid is not None: |
683 if extid is not None: |