mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
timeout should be a float. while i'm here be brutal like a ctrl-c.
This commit is contained in:
parent
a57e2ec7e6
commit
c7bbe77a72
@ -204,7 +204,7 @@ class Arbiter(object):
|
|||||||
except StopIteration:
|
except StopIteration:
|
||||||
break
|
break
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
self.stop()
|
self.stop(False)
|
||||||
sys.exit(-1)
|
sys.exit(-1)
|
||||||
except Exception:
|
except Exception:
|
||||||
self.log.info("Unhandled exception in main loop.")
|
self.log.info("Unhandled exception in main loop.")
|
||||||
@ -338,7 +338,7 @@ class Arbiter(object):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
worker = Worker(i, self.pid, self.LISTENER, self.modname,
|
worker = Worker(i, self.pid, self.LISTENER, self.modname,
|
||||||
self.timeout/2, self.debug)
|
self.timeout/2.0, self.debug)
|
||||||
pid = os.fork()
|
pid = os.fork()
|
||||||
if pid != 0:
|
if pid != 0:
|
||||||
self.WORKERS[pid] = worker
|
self.WORKERS[pid] = worker
|
||||||
|
|||||||
@ -27,7 +27,8 @@ class Worker(object):
|
|||||||
|
|
||||||
PIPE = []
|
PIPE = []
|
||||||
|
|
||||||
def __init__(self, workerid, ppid, socket, app, timeout, debug=False):
|
def __init__(self, workerid, ppid, socket, app, timeout, d
|
||||||
|
ebug=False):
|
||||||
self.nr = 0
|
self.nr = 0
|
||||||
self.id = workerid
|
self.id = workerid
|
||||||
self.ppid = ppid
|
self.ppid = ppid
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user