lib/openwfe/service.rb in openwferu-0.9.7 vs lib/openwfe/service.rb in openwferu-0.9.8

- old
+ new

@@ -49,13 +49,21 @@ include Contextual, Logging attr_accessor \ :service_name + # + # Inits the service by setting the service name and the application + # context. Does also bind the service under the service name in the + # application context. + # def service_init (service_name, application_context) @service_name = service_name @application_context = application_context + + @application_context[@service_name.to_s] = self \ + if @service_name and @application_context end # # Some services (like the scheduler one for example) need to # free some resources upon stopping. This can be achieved by