def update2
      update_node_properties
      logger.info "update2 started (full update)"
      tsb = Time.now
      source_nodes = source_node_properties.keys
      destination_nodes = destination.all_nodes
      delete_missing(destination_nodes, source_nodes)
      errors = false
      complete = source.facts
      complete.each do |node, facts|
        begin
          destination.node_update(node, facts)
        rescue
          errors = true
          logger.error $!
        end
      end
      tse = Time.now
      logger.info "update2 updated #{source_nodes.size} nodes in #{tse - tsb}"
      destination.meta_fact_update("update2", tsb, tse) unless errors
    end
def update2
      update_node_properties
      logger.info "update2 started (full update)"
      tsb = Time.now
      source_nodes = source_node_properties.keys
      destination_nodes = destination.all_nodes
      delete_missing(destination_nodes, source_nodes)
      errors = false
      complete = source.facts
      complete.each do |node, facts|
        begin
          destination.node_update(node, facts)
        rescue
          errors = true
          logger.error $!
        end
      end
      tse = Time.now
      logger.info "update2 updated #{source_nodes.size} nodes in #{tse - tsb}"
      destination.meta_fact_update("update2", tsb, tse) unless errors
    end
update by deleting missing nodes and get a complete map of nodes with facts
 and update or insert facts for each one

 mongo: 1597 nodes in 35.31 seconds