ruby on rails - Determine if Thin server is running as daemon -
i have problem rails , thin server. reason, thin clears out argv variable (i don't ask why :/), , rails application needs determine if thin running daemon server. tried access/find server object in application , rack variables, no luck. if way access thin instance options, or original argv, can parse , figure out if thin running daemon?
solved :)
objectspace.each_object(thin::runner) { |obj| @options = obj.options } @options[:daemonize]
Comments
Post a Comment