本文整理汇总了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