lib/async/container/generic.rb in async-container-0.16.8 vs lib/async/container/generic.rb in async-container-0.16.9

- old
+ new

@@ -117,11 +117,11 @@ # Wait until all the children instances have indicated that they are ready. # @returns [Boolean] The children all became ready. def wait_until_ready while true - Async.logger.debug(self) do |buffer| + Console.logger.debug(self) do |buffer| buffer.puts "Waiting for ready:" @state.each do |child, state| buffer.puts "\t#{child.class}: #{state.inspect}" end end @@ -139,11 +139,11 @@ def stop(timeout = true) @running = false @group.stop(timeout) if @group.running? - Async.logger.warn(self) {"Group is still running after stopping it!"} + Console.logger.warn(self) {"Group is still running after stopping it!"} end ensure @running = true end @@ -153,11 +153,11 @@ # @parameter key [Symbol] A key used for reloading child instances. def spawn(name: nil, restart: false, key: nil, &block) name ||= UNNAMED if mark?(key) - Async.logger.debug(self) {"Reusing existing child for #{key}: #{name}"} + Console.logger.debug(self) {"Reusing existing child for #{key}: #{name}"} return false end @statistics.spawn! @@ -174,23 +174,23 @@ ensure delete(key, child) end if status.success? - Async.logger.info(self) {"#{child} exited with #{status}"} + Console.logger.info(self) {"#{child} exited with #{status}"} else @statistics.failure! - Async.logger.error(self) {status} + Console.logger.error(self) {status} end if restart @statistics.restart! else break end end # ensure - # Async.logger.error(self) {$!} if $! + # Console.logger.error(self) {$!} if $! end.resume return true end