lib/odania/plugin.rb in odania-0.0.4 vs lib/odania/plugin.rb in odania-0.0.5
- old
+ new
@@ -23,10 +23,11 @@
plugin_instance_name = get_plugin_instance_name plugin_name
puts "Writing plugin instance config: #{plugin_instance_name}"
Diplomat::Kv.put("#{get_plugin_path(plugin_name)}#{plugin_instance_name}", JSON.dump(plugin_config))
- Odania.service.register_service(plugin_name, plugin_instance_name, plugin_config['ip'])
+ consul_config = Odania.service.consul_service_config(plugin_name, plugin_instance_name, plugin_config['ip'], plugin_config['tags'], plugin_config['port'])
+ Odania.service.register_service(consul_config)
Diplomat::Event.fire('updated_plugin_config', "#{plugin_name}|#{plugin_instance_name}")
end
private