Sha256: 840b7f8e79d26947a32a283b30fc064636d5a61aa24f0e99b2ac098f07a0f09e

Contents?: true

Size: 417 Bytes

Versions: 11

Compression:

Stored size: 417 Bytes

Contents

class Nginx
	
	include Watchman
	
	def self.data
		out = PS.data.inject({:masters => [], :workers => []}) do |acc,line|
			if line[:command][/^nginx: master/]
				acc[:masters] << line
			end
			if line[:command][/^nginx: worker/]
				acc[:workers] << line
			end
			acc
		end
		out.merge({:num_masters => out[:masters].count, :num_workers => out[:workers].count, :summary => [:num_masters, :num_workers]})
	end
	
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
city-watch-0.4.6 lib/city_watch/watchmen/nginx.rb
city-watch-0.4.5 lib/city_watch/watchmen/nginx.rb
city-watch-0.4.4 lib/city_watch/watchmen/nginx.rb
city-watch-0.4.3 lib/city_watch/watchmen/nginx.rb
city-watch-0.4.2 lib/city_watch/watchmen/nginx.rb
city-watch-0.4.1 lib/city_watch/watchmen/nginx.rb
city-watch-0.4.0 lib/city_watch/watchmen/nginx.rb
city-watch-0.3.3 lib/city_watch/watchmen/nginx.rb
city-watch-0.3.2 lib/city_watch/watchmen/nginx.rb
city-watch-0.3.1 lib/city_watch/watchmen/nginx.rb
city-watch-0.3.0 lib/city_watch/watchmen/nginx.rb