Skip to content

msaServer Module

.srv_gunicorn


Attributes

JSON_LOGS module-attribute

JSON_LOGS = (
    True
    if os.environ.get("JSON_LOGS", "0") == "1"
    else False
)

Classes

InterceptHandler

Bases: logging.Handler

Functions

emit
emit(record)

MSAServerGunicorn

Attributes

app instance-attribute
app = app
app_dir instance-attribute
app_dir: str = app_dir
host instance-attribute
host: str = host
intercept_handler instance-attribute
intercept_handler = InterceptHandler()
log_level instance-attribute
log_level: str = log_level
port instance-attribute
port: int = port
reload instance-attribute
reload: bool = reload
seen instance-attribute
seen = set()
workers instance-attribute
workers: int = workers

Functions

__init__
__init__(
    app: object,
    app_dir: str,
    host: str,
    port: int,
    reload: bool = False,
    log_level: str = "info",
    workers: int = -1,
) -> None
run
run()

StandaloneApplication

Bases: BaseApplication, ABC

Attributes

application instance-attribute
application = app
options instance-attribute
options = options or {}

Functions

__init__
__init__(app, options = None)
load
load()
load_config
load_config()

StubbedGunicornLogger

Bases: Logger

Attributes

access_logger instance-attribute
access_logger = logging.getLogger('gunicorn.access')
error_logger instance-attribute
error_logger = logging.getLogger('gunicorn.error')
handler instance-attribute
handler = logging.NullHandler()
log_level instance-attribute
log_level: str = log_level

Functions

__init__
__init__(cfg, log_level: str = 'info')

Functions

number_of_workers

number_of_workers()

Last update: September 28, 2022
Created: September 28, 2022