Discard/skip empty tags

This commit is contained in:
Scott Schneider 2015-06-30 10:38:59 -07:00
parent b6cb20ba9f
commit 3aa8389749
2 changed files with 11 additions and 0 deletions

View file

@ -499,6 +499,8 @@ module Vmpooler
arg[tag] = arg[tag].match(filter).captures.join if arg[tag].match(filter)
end
next if arg[tag].nil? or arg[tag].empty?
backend.hset('vmpooler__vm__' + params[:hostname], 'tag:' + tag, arg[tag])
backend.hset('vmpooler__tag__' + Date.today.to_s, params[:hostname] + ':' + tag, arg[tag])
end