lib/topological_inventory/orchestrator/targeted_update.rb
def scan_targets!
        @targets.each do |target|
          next if skip_targets_without_source(target)
          next if skip_create_action_of_non_first_app(target)
          next if skip_destroy_action_of_non_last_app(target)

          source, source_type = target[:source], target[:source_type]
          source.source_type = source_type
          source['id'] = source['id'].to_s # if source came from event, id is integer, otherwise string

          force_destroy_action(target)
        end
      end
# Skips inconsistent data (if source not found) and noop destroy events
# Assigns source type etc. to source
# Switch action to "destroy" if source isn't available or supported
Skips inconsistent data (if source not found) and noop destroy events
Assigns source type etc. to source
Switch action to "destroy" if source isn't available or supported
Skips inconsistent data ( if source not found ) and noop destroy events Assigns source type etc . to source Switch action to " destroy " if source isn ' t available or supported
def scan_targets!
        @targets.each do |target|
          next if skip_targets_without_source(target)
          next if skip_create_action_of_non_first_app(target)
          next if skip_destroy_action_of_non_last_app(target)
          source, source_type = target[:source], target[:source_type]
          source.source_type = source_type
          source['id'] = source['id'].to_s 
          force_destroy_action(target)
        end
      end
def scan_targets! @targets . each do | target | next if skip_targets_without_source ( target ) next if skip_create_action_of_non_first_app ( target ) next if skip_destroy_action_of_non_last_app ( target ) source , source_type = target [ :source ] , target [ :source_type ] source . source_type = source_type source [ 'id' ] = source [ 'id' ] . to_s force_destroy_action ( target ) end end
Skips inconsistent data (if source not found) and noop destroy events
Assigns source type etc.
Skips inconsistent data ( if source not found ) and noop destroy events Assigns source type etc .
# if source came from event, id is integer, otherwise string