當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。