Move setting of env vars from Arbiter.start to Arbiter.setup so that they are available during application start up when 'preload_app' is used.
Closes#735
I can't imagine this wasn't what was intended here. Might be a merge
artifact but I can't trace it.
Thanks to Antti Kaihola (@akaihola) for spotting this.
Close#733
PR that rebase #651. Should also fix#625.
Add the capability to load gunicorn.base.Application without the
loading of the arguments of the command line.
This change favors `python2` over `python3` by reversing the try/except order.
Untested in `python3`, as most Django packages are not yet `python3`-compatible.
Works in `python2`, `Django 1.5.4`, `gunicorn 18.0`.
When running `gunicorn` in python 2, if a django model doesn't validate, the `gunicorn` will fail to display informative error messages about your model and instead complain about `str`/`unicode`:
Django was falsely accused of [this bug](https://code.djangoproject.com/ticket/20185)
An exposed SSL option, `ciphers`, was added in Python 2.7 and breaks older
versions of Python with an unexpected kwargs error.
I'm not sure if this is the best way to fix this, and I'm happy to consider
other approachs. Some things I'm a bit up in the air about are:
i) This is only broken for Python 2.6 and older whose ssl module doesn't
expose this. Do the other types of workers not use ssl module, and thus might
be able to make use of the `cipher` kwarg?
ii) Should we silently or explicity fail? I couldn't find a nice way to do
this because the configuration setting has a default value and resulted in
stringy code to special case the one setting`.
What I would really like to do would add a "python_version" validator that
could intelligently handle this, but I went off into the weeds figuring out
how the SettingsMeta class works. :)
Apache will log %D microseconds over 1 million for requests that take over a second, this change sync's that access log behavior since the formatting seems to be based on that. So a request that takes 1 second and 30 milliseconds will have 1000030 for this atom.
This pull request also adds a %L atom for decimal seconds for a quick human-readable latency number. In the above example it would output 1.000030 to the log.
gunicron_paster, gunicorn_django and other hacks are deprecated. This
patch only advertise gunicorn as the standard, stable and well supported
command.
This commit tries to minimize the chance of sending a kill signal
to a process that is not a gunicorn worker by reaping children
as soon as the SIGCHLD is received.
Close#371