'Stop workers
:attr graceful: boolean, If True (the default) workers will be
killed gracefully  (ie. trying to wait for the current connection)'

def stop(self, graceful=True):

    unlink = ((self.reexec_pid == self.master_pid == 0) and (not self.systemd))
    sock.close_sockets(self.LISTENERS, unlink)
    self.LISTENERS = []
    sig = signal.SIGTERM
    if (not graceful):
        sig = signal.SIGQUIT
    limit = (time.time() + self.cfg.graceful_timeout)
    self.kill_workers(sig)
    while (self.WORKERS and (time.time() < limit)):
        time.sleep(0.1)
    self.kill_workers(signal.SIGKILL)
