benoitc
d1858d2284
optimize a little bit headers parsing
2010-08-11 09:24:16 +02:00
benoitc
6f01d46f58
by default no minotr tag if we aren't in a git repo
2010-08-06 08:00:55 +02:00
Paul J. Davis
63b53c9f51
Exit with a non-zero status if workers don't boot.
...
Raising a HaltServer exception in the arbiter will now exit with the
provided reason and status code.
2010-08-05 23:28:25 -04:00
benoitc
56d5582de9
Merge branch 'master' of github.com:benoitc/gunicorn
2010-08-05 21:42:01 +02:00
benoitc
252d594474
strip line ending
2010-08-05 21:41:40 +02:00
Randall Leeds
17decda1e3
catch SystemExit exception and exit quietly
...
raised by:
1) workers started during reload (main loop) that are killed later
2) the arbiter process during Ctl-C or other halt signals
2010-08-06 01:02:20 +08:00
benoitc
8903d0d53a
fix from tilgovi. thanks
2010-08-05 15:42:07 +02:00
benoitc
5108a720f2
use a specific release number for dev depending on git tag
2010-07-31 16:18:13 +02:00
Randall Leeds
800637c192
RAW_URI is full uri (query etc.), not just path
2010-07-26 04:20:55 +08:00
Paul J. Davis
93ad20e4fc
Minor white space and ordering fixes for my CDO
2010-07-23 20:47:56 -04:00
jbergstroem
eca6fad4ce
Output config if debug loglevel is set
2010-07-23 20:47:56 -04:00
jbergstroem
7acfe5c0c7
Update documentation to reflect changes in aca70fb
2010-07-23 20:47:56 -04:00
jbergstroem
e99a384a22
Initialize logging before setup since setup can emit warnings to log
2010-07-23 20:47:56 -04:00
jbergstroem
0d67447d19
Add pre/post request hooks
2010-07-23 20:41:16 -04:00
Benoit Chesneau
aca70fbec8
allows worker_class uri shortcut. It's now possible to do :
...
gunicorn -w 3 -k gevent test:app
ie. removing the need of using egg:gunicorn before.
2010-07-23 10:57:21 +02:00
Randall Leeds
dbd66b6191
work around evdns not playing well with fork
2010-07-22 14:26:37 -07:00
Paul J. Davis
9f941215d1
Slight change to worker booting message.
2010-07-22 14:53:59 -04:00
Paul J. Davis
063bd357f3
Set SERVER_PORT correctly when not specified.
2010-07-21 17:25:08 -04:00
Benoit Chesneau
ae721f00d0
fix SERVER_PROTOCOL in WSGI environ and fix gevent one.
2010-07-16 12:49:23 +02:00
Paul Davis
d09f85edf0
Minor tweaks to new Gevent workers.
...
Just a slight rearangement and added some docs so I can remember which
worker is which in the future. Also renamed all occurrences of GEvent
to Gevent to have consistency.
2010-07-14 18:27:35 -04:00
Benoit Chesneau
8014555636
add full support for gevent. There is now 3 workers allowing us to use gunicorn with
...
gevent :
- egg:gunicorn#gevent : gevent with gunicorn HTTP/WSGI parser
- egg:gunicorn#gevent_wsgi : gevent.wsgi server
- egg:gunicorn#gevent_pywsgi : gevent.pywsgi
2010-07-14 23:45:44 +02:00
Benoit Chesneau
40146dfe4f
denik: acceptor = gevent.spawn(server.serve_forever) --- can just write
...
server.start() - it's asynchronous
go for it then.
2010-07-14 23:28:36 +02:00
Benoit Chesneau
3be6826ea1
rewrite ggevent2 workerr to support last gevent 0.13. a lot more stable
...
and faster than it was. gevent 0.13 give new streaming possibilities and
keepalive.
2010-07-14 23:18:59 +02:00
benoitc
9ae104be59
bump 0.10.0
2010-07-08 21:34:26 +02:00
benoitc
9af95b7f8d
osi.waitpid patching is broken in eventlet and prevent arbiter to exit.
...
Waiting upstream fixes, don't patch it for now.
2010-07-08 19:30:55 +02:00
benoitc
3b8e594200
remove this exit here
2010-07-08 18:55:13 +02:00
Paul J. Davis
3ad7c1b395
Make WSGI app names are now evaled in the module namespace.
...
This allows people to pass info from the command line to a WSGI
application. See examples/alt_spec.py for code that uses this
method. Example invocation:
$ gunicorn 'alt_spec:load("my arg here")'
Notice the single quotes to avoid shell escape semantics.
Closes #56
Closes #40
2010-07-08 00:12:15 -04:00
Paul J. Davis
e12e77765a
Ignore StopIteration in HTTP parser.
...
We're specifically throwing the stop iteration to signal that a
connection was closed before data appeared (which is necessary for
the Keep-Alive processing). While a bit confusing for sync workers
as there's no Keep-Alive, it is an expected behavior.
Closes #65
2010-07-07 20:25:34 -04:00
Randall Leeds
4e20f606f1
fix inconsistencies with urlparse lib
2010-07-01 13:15:15 +08:00
benoitc
5d9de13b59
close issue #66 . Display a more explicit error message and raise.
2010-06-30 04:58:26 +02:00
benoitc
46e8002ffc
Fix a bug spotted while testin parser in restkit.
2010-06-26 22:53:18 +02:00
benoitc
a461817309
fix websocket with protocol 076. Fix from tom on irc. Thanks!
2010-06-24 16:20:48 +02:00
benoitc
9bc19c2c86
wsgi.multiprocess depends on number of workers.
2010-06-22 19:24:43 +02:00
benoitc
2f06305ce4
fix wsgi env.
2010-06-22 14:05:11 +02:00
benoitc
06a4dc6881
fix one error in gunicorn_paster, global conf was ignored... While I'm
...
here change a little the behaviour of debug mode so we can still have
multiple workers in gunicorn :
- Don't preload app
- Set wsgi.multiprocess=False
rationnal is that when app isn't loaded it run in its own thread and
can't be evaluated by another process simultaneously. So setting
wsgi.multiprocess in this case sound good.
2010-06-22 13:10:49 +02:00
benoitc
6121ace7e7
QUERY_STRING can't be none.
2010-06-21 12:44:48 +02:00
benoitc
d5f2b5358a
Refactored the configuration system.
...
Some preliminary work on refactoring the configuration system to
allow for some backwards compatibility with Python 2.4.
2010-06-17 19:45:51 -04:00
benoitc
b2a97e4622
wait a little, depending on the system, the socket took some time to be
...
released. Solve error I have when testing and going back to old address
too fast.
2010-06-17 17:12:55 +02:00
benoitc
6ca1a2398e
there is no need to except, just reload in handle_hup method.
2010-06-17 17:09:22 +02:00
benoitc
8b10e33ecd
just display listening info if addres has changed on HUP.
2010-06-17 16:48:55 +02:00
benoitc
92157fc503
old_listener is useless.
2010-06-17 16:43:38 +02:00
benoitc
7409535d69
no need to import socket
2010-06-17 16:33:27 +02:00
benoitc
8a1f1ffe4f
empty lines
2010-06-17 16:31:28 +02:00
benoitc
5b363c4ab2
make sure we reset config on reload.
2010-06-17 16:23:49 +02:00
benoitc
a4fdb93757
just reload config and stay in the loop.
2010-06-17 15:55:45 +02:00
benoitc
e1647837d4
some errors spotted by pyflakes
2010-06-17 00:43:48 +02:00
benoitc
da91ec5e93
fix issue #63 . thanks!
2010-06-17 00:10:05 +02:00
Paul Smith
48912484be
Fix Arbiter bugs
2010-06-16 15:29:12 -04:00
benoitc
ebca25dddb
make sure conf is available when spawning workers. Also since run
...
already manage_workers, no need to run this function in reload.
2010-06-16 11:38:35 +02:00
benoitc
d5b76ac651
socket.from_fd return a _socket.socket object instead of socket.socket
...
(at least on py26). Instead of testing type of instance, just test if
the source has a "recv" method. Fix bug in usr2 with new parser.
2010-06-16 11:30:36 +02:00