MCPcopy Index your code
hub / github.com/diffgram/diffgram / declare_newly_deleted_instance

Method declare_newly_deleted_instance

shared/annotation.py:2155–2180  ·  view source on GitHub ↗
(
        self,
        instance)

Source from the content-addressed store, hash-verified

2153 self.declare_newly_deleted_instance(instance = instance)
2154
2155 def declare_newly_deleted_instance(
2156 self,
2157 instance):
2158
2159 logger.info(f"Newly Deleted {instance.id}")
2160
2161 self.new_deleted_instances.append(instance.id)
2162
2163 self.update_instance_count(action_type = 'delete_instance')
2164
2165 # Prevent from updating the original deletion time.
2166 if not instance.deleted_time:
2167 instance.deleted_time = datetime.datetime.utcnow()
2168
2169 sequence = self.sequence_update(
2170 instance = instance,
2171 update_existing_only = True)
2172
2173 if sequence:
2174 if sequence.id not in self.added_sequence_ids:
2175 sequence.remove_keyframe_to_cache(self.session, instance)
2176 self.session.add(sequence)
2177
2178 self.count_instances_changed += 1
2179
2180 self.session.add(instance)
2181
2182
2183######################################################################################################

Callers 1

Calls 4

update_instance_countMethod · 0.95
sequence_updateMethod · 0.95
addMethod · 0.45

Tested by

no test coverage detected