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
$unicorn_uptime.freeze
<snip>
Unfortunately the variable comes up nil when later accessed. Anyone have
thoughts on what I am missing?
Thanks!
-Joe
next 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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
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 \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* 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
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).