From: "Iñaki Baz Castillo" <ibc@aliax.net>
To: mongrel-unicorn@rubyforge.org
Subject: Suggestion for reload action (USR2)
Date: Wed, 20 Jan 2010 09:54:12 +0100 [thread overview]
Message-ID: <201001200954.12169.ibc@aliax.net> (raw)
Hi, when Unicorn receives a USR2 it invokes the original script and arguments
and creates a new master as a child.
However when running this new master there could be something to treat
different as when we run Unicorn for first time.
For example:
- In the initial unicorn master I want it to create a Posix_mq, and in case it
already exists then I want it to delete and create again.
- But in the new master (when USR2) I just want it to reuse the existing
Posiq_mq.
Note this is just an example, perhaps not the best however.
So I suggest the following:
- When unicorn master receives a USR2 it executes the original executable
withthe original arguments plus "--reload". This just would mean that the new
instance is a reloaded process. The executable could store such option
somewhere so the application could know it and react.
This would involve just three changes:
- Add an option "--reload" in OptionParser in bin/unicorn.
- Store such option somewhere so it can be readed later by the Rack
application or other library.
- Add "--reload" to the list of original arguments when receiving USR2.
Opinnions?
--
Iñaki Baz Castillo <ibc@aliax.net>
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying
next reply other threads:[~2010-01-20 8:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-20 8:54 Iñaki Baz Castillo [this message]
-- strict thread matches above, loose matches on Subject: below --
2010-01-20 9:20 Suggestion for reload action (USR2) Iñaki Baz Castillo
2010-01-20 20:03 ` Eric Wong
2010-01-20 20:22 ` Iñaki Baz Castillo
2010-01-20 20:58 ` Eric Wong
2010-01-21 11:20 ` Iñaki Baz Castillo
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=201001200954.12169.ibc@aliax.net \
--to=ibc@aliax.net \
--cc=mongrel-unicorn@rubyforge.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).