refactor: enable profiler from env variable

This commit is contained in:
leela 2021-04-26 06:24:03 +05:30
parent 1a30e11b5f
commit d8d86f7498

View file

@ -286,7 +286,7 @@ def serve(port=8000, profile=False, no_reload=False, no_threading=False, site=No
from werkzeug.serving import run_simple
if profile:
if profile or os.environ.get('USE_PROFILER'):
application = ProfilerMiddleware(application, sort_by=('cumtime', 'calls'))
if not os.environ.get('NO_STATICS'):