mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
fix django extensions
This commit is contained in:
parent
dabf3395aa
commit
ec7614f50c
@ -3,10 +3,10 @@
|
|||||||
# This file is part of gunicorn released under the MIT license.
|
# This file is part of gunicorn released under the MIT license.
|
||||||
# See the NOTICE for more information.
|
# See the NOTICE for more information.
|
||||||
|
|
||||||
|
|
||||||
import sys
|
|
||||||
|
|
||||||
from optparse import make_option
|
from optparse import make_option
|
||||||
|
import sys
|
||||||
|
import os
|
||||||
|
|
||||||
|
|
||||||
import django
|
import django
|
||||||
from django.core.management.base import BaseCommand, CommandError
|
from django.core.management.base import BaseCommand, CommandError
|
||||||
@ -16,7 +16,7 @@ from django.core.servers.basehttp import AdminMediaHandler, WSGIServerException
|
|||||||
from django.core.handlers.wsgi import WSGIHandler
|
from django.core.handlers.wsgi import WSGIHandler
|
||||||
|
|
||||||
from gunicorn.arbiter import Arbiter
|
from gunicorn.arbiter import Arbiter
|
||||||
from gunicorn.main import daemonize, UMASK
|
from gunicorn.main import daemonize, UMASK, set_owner_process
|
||||||
from gunicorn.util import parse_address
|
from gunicorn.util import parse_address
|
||||||
|
|
||||||
class Command(BaseCommand):
|
class Command(BaseCommand):
|
||||||
@ -77,7 +77,7 @@ class Command(BaseCommand):
|
|||||||
daemonize(umask)
|
daemonize(umask)
|
||||||
else:
|
else:
|
||||||
os.setpgrp()
|
os.setpgrp()
|
||||||
set_owner_process(options.user, options.group)
|
set_owner_process(options.get("user"), options.get("group"))
|
||||||
arbiter.run()
|
arbiter.run()
|
||||||
except WSGIServerException, e:
|
except WSGIServerException, e:
|
||||||
# Use helpful error messages instead of ugly tracebacks.
|
# Use helpful error messages instead of ugly tracebacks.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user