'Reclaim instances that are queued for deletion.'

@periodic_task.periodic_task
def _reclaim_queued_deletes(self, context):

    interval = CONF.reclaim_instance_interval
    if (interval <= 0):
        LOG.debug('CONF.reclaim_instance_interval    <=    0,    skipping...')
        return
    filters = {'vm_state': vm_states.SOFT_DELETED, 'task_state': None, 'host': self.host}
    instances = objects.InstanceList.get_by_filters(context, filters, expected_attrs=objects.instance.INSTANCE_DEFAULT_FIELDS, use_slave=True)
    for instance in instances:
        if self._deleted_old_enough(instance, interval):
            bdms = objects.BlockDeviceMappingList.get_by_instance_uuid(context, instance.uuid)
            LOG.info('Reclaiming    deleted    instance', instance=instance)
            try:
                self._delete_instance(context, instance, bdms)
            except Exception as e:
                LOG.warning('Periodic    reclaim    failed    to    delete    instance:    %s', e, instance=instance)
