Skip to content

Commit

Permalink
Collect all mapped tags that need resolving
Browse files Browse the repository at this point in the history
  • Loading branch information
cben committed Sep 25, 2017
1 parent 38015ad commit 2ce4ff1
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,16 @@ def find_or_store_data(data_index_path, data_key, new_result)
## Shared parsing methods

def map_labels(model_name, labels)
ContainerLabelTagMapping.map_labels(@label_tag_mapping, model_name, labels)
tag_hashes = ContainerLabelTagMapping.map_labels(@label_tag_mapping, model_name, labels)
# Deduplicate tag hashes, store them all in @data_index, like we do for images.
tag_hashes.each do |tag_hash|
# Has {:tag_id} or {:category_tag_id, :entry_name, :entry_description}
if tag_hash[:entry_name]
find_or_store_data([:tag, :by_category_and_entry, tag_hash[:category_tag_id], tag_hash[:entry_name]],
:tags_to_resolve, tag_hash)
end
end
tag_hashes
end

def find_host_by_provider_id(provider_id)
Expand Down

0 comments on commit 2ce4ff1

Please sign in to comment.