Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install rainbow-saddle

How to install rainbow-saddle

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install rainbow-saddle
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
Windows (64-bit)
Mac OS X (10.5+)
Linux (32-bit)
Linux (64-bit)
0.1 Available View build log
 
Author
License
BSD
Dependencies
Imports
Lastest release
version 0.1 on Jan 9th, 2014

Rainbow Saddle

rainbow-saddle is a wrapper around Gunicorn to simplify code reloading without dropping requests.

Installation

Install from pypi:

$ sudo pip install rainbow-saddle

Or from source:

$ sudo ./setup.py install
Why?

Sometimes doing a kill -HUP <gunicorn PID> is not sufficient to reload your code. For example it doesn't work well if you host your code behind a symlink, or if a .pth in your installation is updated to point to a different directory.

The correct way to reload code in such situations is a bit complicated:

# Reexec a new master with new workers
/bin/kill -s USR2 `cat "$PID"`
# Graceful stop old workers
/bin/kill -s WINCH `cat "$PIDOLD"`
# Graceful stop old master
/bin/kill -s QUIT `cat "$PIDOLD"`

It also has the downside of changing the "master" process PID, which confuses tools such as supervisord.

rainbow-saddle handles all of this for you, and never changes its PID. Reloading code becomes as simple as sending a SIGHUP again:

$ rainbow-saddle --pid /tmp/mysite.pid gunicorn_paster development.ini --log-level debug
$ kill -HUP `cat /tmp/mysite.pid`

News

0.2a1

Release date: UNRELEASED

  • Example news entry for the in-development version
0.1

Release date: 15-Mar-2010

  • Example news entry for a released version

Subscribe to package updates

Last updated Jan 9th, 2014

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.