本文整理匯總了Python中gunicorn.SERVER_SOFTWARE屬性的典型用法代碼示例。如果您正苦於以下問題:Python gunicorn.SERVER_SOFTWARE屬性的具體用法?Python gunicorn.SERVER_SOFTWARE怎麽用?Python gunicorn.SERVER_SOFTWARE使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類gunicorn
的用法示例。
在下文中一共展示了gunicorn.SERVER_SOFTWARE屬性的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: __init__
# 需要導入模塊: import gunicorn [as 別名]
# 或者: from gunicorn import SERVER_SOFTWARE [as 別名]
def __init__(self, app):
os.environ["SERVER_SOFTWARE"] = SERVER_SOFTWARE
self._num_workers = None
self.setup(app)
self.pidfile = None
self.worker_age = 0
self.reexec_pid = 0
self.master_name = "Master"
cwd = util.getcwd()
args = sys.argv[:]
args.insert(0, sys.executable)
# init start context
self.START_CTX = {
"args": args,
"cwd": cwd,
0: sys.executable
}
示例2: base_environ
# 需要導入模塊: import gunicorn [as 別名]
# 或者: from gunicorn import SERVER_SOFTWARE [as 別名]
def base_environ(cfg):
return {
"wsgi.errors": WSGIErrorsWrapper(cfg),
"wsgi.version": (1, 0),
"wsgi.multithread": False,
"wsgi.multiprocess": (cfg.workers > 1),
"wsgi.run_once": False,
"wsgi.file_wrapper": FileWrapper,
"SERVER_SOFTWARE": SERVER_SOFTWARE,
}
示例3: __init__
# 需要導入模塊: import gunicorn [as 別名]
# 或者: from gunicorn import SERVER_SOFTWARE [as 別名]
def __init__(self, req, sock, cfg):
self.req = req
self.sock = sock
self.version = SERVER_SOFTWARE
self.status = None
self.chunked = False
self.must_close = False
self.headers = []
self.headers_sent = False
self.response_length = None
self.sent = 0
self.upgrade = False
self.cfg = cfg
示例4: __init__
# 需要導入模塊: import gunicorn [as 別名]
# 或者: from gunicorn import SERVER_SOFTWARE [as 別名]
def __init__(self, app):
os.environ["SERVER_SOFTWARE"] = SERVER_SOFTWARE
self._num_workers = None
self._last_logged_active_worker_count = None
self.log = None
self.setup(app)
self.pidfile = None
self.worker_age = 0
self.reexec_pid = 0
self.master_pid = 0
self.master_name = "Master"
cwd = util.getcwd()
args = sys.argv[:]
args.insert(0, sys.executable)
# init start context
self.START_CTX = {
"args": args,
"cwd": cwd,
0: sys.executable
}
示例5: setup_server_software
# 需要導入模塊: import gunicorn [as 別名]
# 或者: from gunicorn import SERVER_SOFTWARE [as 別名]
def setup_server_software():
import gunicorn
gunicorn.SERVER_SOFTWARE = 'Esdc/' + get_version()
del gunicorn