unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
* global variable in after_fork
@ 2015-01-23 18:32 Joe Williams
  2015-01-24 23:30 ` Eric Wong
  0 siblings, 1 reply; 2+ messages in thread
From: Joe Williams @ 2015-01-23 18:32 UTC (permalink / raw)
  To: unicorn-public

I am attempting to do something like the following:

after_fork do |server, worker|
  $unicorn_uptime = Time.now.to_i.to_s
  $unicorn_uptime.freeze
<snip>

Unfortunately the variable comes up nil when later accessed. Anyone have
thoughts on what I am missing?

Thanks!
-Joe


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-01-24 23:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-23 18:32 global variable in after_fork Joe Williams
2015-01-24 23:30 ` Eric Wong

Code repositories for project(s) associated with this public inbox

	https://yhbt.net/unicorn.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).