405 Commits

Author SHA1 Message Date
benoitc
e06b44a28f fix issue #51. Support https schema. Pas an Http header to gunicorn :
X-Forwarded-Protocol=https , X-Forwarded-Ssl=on
2010-05-26 16:27:12 +02:00
Paul J. Davis
12f8215e04 Avoid infinite loops spawning workers.
I noticed with preload that if a worker fails to boot the arbiter will
dutifully respawn it. Only to watch it die again. This patch makes it so
if a worker process exits before making it to the run loop the process
will exit with a special exit code. When the arbiter sees this flag it
will shutdown all processes assuming there is an unrecoverable error.
2010-05-25 19:54:33 -04:00
benoitc
b23b64badf bump version 2010-05-25 19:25:41 -04:00
benoitc
767dc16544 remove -d option and update doc. 2010-05-25 19:25:25 -04:00
Paul J. Davis
2f1c9177aa Allow for pidfiles in $CWD 2010-05-25 19:24:03 -04:00
benoitc
db1c70a44e fix issue #59. 2010-05-25 19:23:42 -04:00
Paul J. Davis
ce5527d682 Allow string values to be None. 2010-05-25 11:44:33 -04:00
benoitc
954fcae167 bump to 0.9.0, prepare release. 2010-05-24 09:08:42 +02:00
Paul J. Davis
7a4aa51703 Improve error message for bad config parameters. 2010-05-23 20:33:13 -04:00
benoitc
4005614ced when_ready hook. Called just after the server is started 2010-05-23 00:45:31 +02:00
benoitc
f8fac58d73 some fixes discovered with pyflakes 2010-05-23 00:44:53 +02:00
benoitc
9e203e0637 missing import 2010-05-23 00:37:40 +02:00
benoitc
7629575d8d handle preload in django command 2010-05-22 21:18:40 +02:00
benoitc
62540cffaa commit changes from @davisp + some fixes 2010-05-22 21:11:25 +02:00
benoitc
f7c91e7e86 load after forking 2010-05-22 20:07:08 +02:00
benoitc
776b158683 add preload_app setting 2010-05-22 19:53:02 +02:00
Paul J. Davis
b59b1948a3 Forgot another license header. 2010-05-22 12:57:59 -04:00
benoitc
70d1d7e99a don't print this debug message 2010-05-22 11:03:59 +02:00
Benoit Chesneau
17a989672d allows Usage=None 2010-05-22 06:14:13 +02:00
Paul J. Davis
6ffbe54734 Added unit tests for new Config code. 2010-05-21 22:54:22 -04:00
Benoit Chesneau
f738d82bb7 self. 2010-05-19 23:22:36 +02:00
Benoit Chesneau
fd3a5b6dcb import from __future__ for py25. 2010-05-19 13:40:13 -04:00
Benoit Chesneau
6fbed7ba5b iteritems is deprececated or doesn't exist in future versions of
python3. Instead use list(somedict.items()).
2010-05-19 13:39:39 -04:00
Benoit Chesneau
d46dfad91f fix paster application 2010-05-19 13:39:39 -04:00
Benoit Chesneau
cdffaeff16 fix django run 2010-05-19 13:39:39 -04:00
Benoit Chesneau
b99355e0a7 some fixes in DjangoApplication 2010-05-19 13:39:38 -04:00
Paul J. Davis
2c73a41ab7 Load wsgi apps after reading the configuration. 2010-05-19 13:39:38 -04:00
Paul J. Davis
793323789d Changing setting definitions from INI to Py
Settings are now enumerated in config.py
2010-05-19 13:39:38 -04:00
Paul J. Davis
36f1bc9748 Fixed a typo when setting config parameters. 2010-05-19 13:39:38 -04:00
Benoit Chesneau
c01123eb06 adapt django command to new config stuff. 2010-05-19 13:39:37 -04:00
Paul J. Davis
036f8b50d9 Major refactor of the configuration mechanics.
* All configuration and bootup is handled by the Application objects.

* There is now a strict ordering on the precedence of configuration
settings:

  1. Each option is given a default value of some sort in options.ini

  2. Any detectable framework configuration settings override the hard
     coded defaults for options. Currently, only Paster applications
     have support for this.

  3. Anything that is specified in a Gunicorn configuration file (by
     default gunicorn.conf.py) overrides what was possibly set by a
     framework specific configuration source.

  4. Anything specified on the command line reins supreme. The command
     line is the final authority on a given configuration option.
     Though, not all configuration options are available via command
     line.

* Configuration metadata is pulled from an options.ini. In the future I'll
use this to build the example gunicorn.conf.py and the config.rst file
in docs/site/config.rst.

I haven't tested the differences thoroughly. The next item on my agenda
is to figure out a way to start testing Gunicorn that doesn't make my
eyes bleed.
2010-05-19 13:39:37 -04:00
Paul J. Davis
5268b8fbbb Create an application abstraction.
Groundwork for providing a post-fork app import option.
Fixes paster's ini not being able to register changes.
2010-05-19 13:39:10 -04:00
Paul J. Davis
63e39e1232 Slight grammar tweak. 2010-05-19 13:34:42 -04:00
Benoit Chesneau
fdf8169a2c fix issue #57 and make sure target dir of pidfile exists. 2010-05-19 19:29:51 +02:00
Benoit Chesneau
ed17054137 fix issue #55. Thanks! 2010-05-17 16:31:25 +02:00
Benoit Chesneau
71587482a3 0.9.0-dev version . 2010-05-17 06:51:55 +02:00
Benoit Chesneau
a4f850cd73 fix reexec 2010-05-17 05:38:03 +02:00
Benoit Chesneau
c35fe1f472 bump 0.8.2 2010-05-16 21:25:09 +02:00
Paul J. Davis
1a03c3f36e Bug preventing HUP completion.
Just a bit of cruft from the pidfile updates.
2010-05-16 14:02:55 -04:00
benoitc
5038c3785a dns monkey patch is broken currently in gevent. Waiting upstream fix it,
don't patch it.
2010-05-12 17:54:37 +02:00
Paul J. Davis
0a46d09c6e Avoid a deadlock when the acceptor loop raises.
An out of file descriptors error was causing the async acceptor loops to
die. The notification process was unaffected so the workers didn't die.

Async workers hitting an error in the acceptor now kill themselves and
rely on the arbiter to restart a new worker in their stead.
2010-05-11 23:33:48 -04:00
Paul J. Davis
db5bd53c4e If no pidfile is specified, use a random tmp file. 2010-05-11 23:10:52 -04:00
benoitc
2bc67cc8b8 better handling of QUIT/HUP soignal to fix issue #49. We want graceful
quit or restart if possible.
2010-05-10 12:25:34 +02:00
benoitc
ba06498d7d fix issue #47 2010-05-09 21:39:45 +02:00
benoitc
87760fe750 put pidfile funcs in object on suggestion from davisp "but that's a
simple change"
2010-05-09 01:49:24 +02:00
benoitc
cbd91309fe don't use a property, instead use simple function. spotted by davisp:
"It seems too magical to me"
2010-05-09 01:13:32 +02:00
benoitc
5c2112b93b bum release to 0.8.1. (fix __builtins__ bug) 2010-04-29 09:43:21 +02:00
Paul J. Davis
22695ff248 Assume non-web.Application instances are WSGI. 2010-04-26 20:08:05 -04:00
Paul J. Davis
999dd68ca3 Load app after the configuration.
This allows for affecting system variables like sys.path before import
searches for the application.

Fixes issue #44.
2010-04-26 19:59:46 -04:00
Paul J. Davis
2c5f221d1a Fix KeyError if builtins isn't touched. 2010-04-26 13:29:23 -04:00