lib/odania/service.rb in odania-0.0.11 vs lib/odania/service.rb in odania-0.0.13
- old
+ new
@@ -6,9 +6,20 @@
else
puts 'Error registering service'
end
end
+ def get(name)
+ begin
+ Diplomat::Service.get(name)
+ rescue Diplomat::PathNotFound => e
+ puts "Service not found: #{e}"
+ puts e.backtrace.inspect
+
+ throw e
+ end
+ end
+
def consul_service_config(plugin_name, plugin_instance_name, ip, tags=[], port=80)
{
'id' => plugin_instance_name,
'name' => plugin_name,
'tags' => tags,