当前位置: 首页>>代码示例>>Python>>正文


Python gunicorn.SERVER_SOFTWARE属性代码示例

本文整理汇总了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
        } 
开发者ID:chalasr,项目名称:Flask-P2P,代码行数:24,代码来源:arbiter.py

示例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,
    } 
开发者ID:jpush,项目名称:jbox,代码行数:12,代码来源:wsgi.py

示例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 
开发者ID:jpush,项目名称:jbox,代码行数:15,代码来源:wsgi.py

示例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
        } 
开发者ID:jpush,项目名称:jbox,代码行数:28,代码来源:arbiter.py

示例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 
开发者ID:erigones,项目名称:esdc-ce,代码行数:6,代码来源:utils.py


注:本文中的gunicorn.SERVER_SOFTWARE属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。