|
13 | 13 | from .tornado import webio_handler, set_ioloop |
14 | 14 | from .tornado_http import TornadoHttpContext |
15 | 15 | from .utils import cdn_validation, make_applications |
16 | | -from ..session import register_session_implement, CoroutineBasedSession, ThreadBasedSession |
| 16 | +from ..session import register_session_implement, CoroutineBasedSession, ThreadBasedSession, Session |
17 | 17 | from ..utils import get_free_port, STATIC_PATH, parse_file_size |
18 | 18 |
|
19 | 19 |
|
@@ -245,7 +245,7 @@ def path_deploy(base, port=0, host='', |
245 | 245 |
|
246 | 246 | The rest arguments of ``path_deploy()`` have the same meaning as for :func:`pywebio.platform.tornado.start_server` |
247 | 247 | """ |
248 | | - |
| 248 | + debug = Session.debug = os.environ.get('PYWEBIO_DEBUG', debug) |
249 | 249 | utils.MAX_PAYLOAD_SIZE = max_payload_size = parse_file_size(max_payload_size) |
250 | 250 | # Since some cloud server may close idle connections (such as heroku), |
251 | 251 | # use `websocket_ping_interval` to keep the connection alive |
@@ -301,6 +301,8 @@ def path_deploy_http(base, port=0, host='', |
301 | 301 |
|
302 | 302 | The rest arguments of ``path_deploy_http()`` have the same meaning as for :func:`pywebio.platform.tornado_http.start_server` |
303 | 303 | """ |
| 304 | + debug = Session.debug = os.environ.get('PYWEBIO_DEBUG', debug) |
| 305 | + |
304 | 306 | utils.MAX_PAYLOAD_SIZE = max_payload_size = parse_file_size(max_payload_size) |
305 | 307 |
|
306 | 308 | gen = _path_deploy(base, port=port, host=host, |
|
0 commit comments