Rename NO_UVLOOP to USE_UVLOOP in config

This commit is contained in:
prryplatypus 2021-10-04 20:20:57 +02:00
parent 6f776c1a2e
commit e6e0cd6528
No known key found for this signature in database
GPG Key ID: 6687E128FB70819B
2 changed files with 3 additions and 3 deletions

View File

@ -206,7 +206,7 @@ class Sanic(BaseSanic, metaclass=TouchUpMeta):
if self.config.REGISTER:
self.__class__.register_app(self)
if not self.config.NO_UVLOOP:
if self.config.USE_UVLOOP:
use_uvloop()
self.router.ctx.app = self

View File

@ -27,7 +27,6 @@ DEFAULT_CONFIG = {
"GRACEFUL_SHUTDOWN_TIMEOUT": 15.0, # 15 sec
"KEEP_ALIVE_TIMEOUT": 5, # 5 seconds
"KEEP_ALIVE": True,
"NO_UVLOOP": False,
"PROXIES_COUNT": None,
"REAL_IP_HEADER": None,
"REGISTER": True,
@ -37,6 +36,7 @@ DEFAULT_CONFIG = {
"REQUEST_MAX_SIZE": 100000000, # 100 megabytes
"REQUEST_TIMEOUT": 60, # 60 seconds
"RESPONSE_TIMEOUT": 60, # 60 seconds
"USE_UVLOOP": False,
"WEBSOCKET_MAX_SIZE": 2 ** 20, # 1 megabyte
"WEBSOCKET_PING_INTERVAL": 20,
"WEBSOCKET_PING_TIMEOUT": 20,
@ -52,7 +52,6 @@ class Config(dict):
GRACEFUL_SHUTDOWN_TIMEOUT: float
KEEP_ALIVE_TIMEOUT: int
KEEP_ALIVE: bool
NO_UVLOOP: bool
PROXIES_COUNT: Optional[int]
REAL_IP_HEADER: Optional[str]
REGISTER: bool
@ -63,6 +62,7 @@ class Config(dict):
REQUEST_TIMEOUT: int
RESPONSE_TIMEOUT: int
SERVER_NAME: str
USE_UVLOOP: bool
WEBSOCKET_MAX_SIZE: int
WEBSOCKET_PING_INTERVAL: int
WEBSOCKET_PING_TIMEOUT: int