unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Joe Williams <williams.joe@gmail.com>
To: unicorn-public@bogomips.org
Subject: global variable in after_fork
Date: Fri, 23 Jan 2015 10:32:33 -0800	[thread overview]
Message-ID: <CAJtkKzZ35_7tMFx5dNQbHASGEjYiE5pL7EWHDnhLQ4P8zPCJ7Q@mail.gmail.com> (raw)

I am attempting to do something like the following:

after_fork do |server, worker|
  $unicorn_uptime = Time.now.to_i.to_s

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


             reply	other threads:[~2015-01-23 18:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-23 18:32 Joe Williams [this message]
2015-01-24 23:30 ` global variable in after_fork Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://yhbt.net/unicorn/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJtkKzZ35_7tMFx5dNQbHASGEjYiE5pL7EWHDnhLQ4P8zPCJ7Q@mail.gmail.com \
    --to=williams.joe@gmail.com \
    --cc=unicorn-public@bogomips.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


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).