mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-11-22 00:37:36 -06:00
Remove cheroot server for now until we find a way to shutdown cheroot using REST call. Fixes #5069.
This commit is contained in:
parent
76d04205ef
commit
093d7af748
@ -16,7 +16,6 @@ Housekeeping
|
||||
************
|
||||
|
||||
| `Issue #4988 <https://redmine.postgresql.org/issues/4988>`_ - Refactored SQL of Table's and it's child nodes.
|
||||
| `Issue #5017 <https://redmine.postgresql.org/issues/5017>`_ - Use cheroot as default production server for pgAdmin4.
|
||||
| `Issue #5023 <https://redmine.postgresql.org/issues/5023>`_ - Refactored SQL of Views and Materialized Views.
|
||||
| `Issue #5024 <https://redmine.postgresql.org/issues/5024>`_ - Refactored SQL of Functions and Procedures.
|
||||
| `Issue #5038 <https://redmine.postgresql.org/issues/5038>`_ - Added support for on-demand loading of items in Select2.
|
||||
|
@ -15,7 +15,6 @@
|
||||
# ignored when building a PIP Wheel.
|
||||
##############################################################################
|
||||
blinker==1.4
|
||||
cheroot==8.2.1
|
||||
Flask==1.0.2
|
||||
Werkzeug>=0.15.0
|
||||
Flask-Gravatar==0.5.0
|
||||
|
@ -13,7 +13,6 @@ to start a web server."""
|
||||
|
||||
import os
|
||||
import sys
|
||||
from cheroot.wsgi import Server as CherootServer
|
||||
|
||||
if sys.version_info[0] >= 3:
|
||||
import builtins
|
||||
@ -191,29 +190,15 @@ if __name__ == '__main__':
|
||||
# Reference:
|
||||
# https://github.com/pallets/werkzeug/issues/220#issuecomment-11176538
|
||||
try:
|
||||
if config.DEBUG:
|
||||
app.run(
|
||||
host=config.DEFAULT_SERVER,
|
||||
port=server_port,
|
||||
use_reloader=(
|
||||
(not PGADMIN_RUNTIME) and app.debug and
|
||||
os.environ.get("WERKZEUG_RUN_MAIN") is not None
|
||||
),
|
||||
threaded=config.THREADED_MODE
|
||||
)
|
||||
else:
|
||||
# Can use cheroot instead of flask dev server when not in debug
|
||||
# 10 is default thread count in CherootServer
|
||||
num_threads = 10 if config.THREADED_MODE else 1
|
||||
prod_server = CherootServer(
|
||||
(config.DEFAULT_SERVER, server_port),
|
||||
wsgi_app=app,
|
||||
numthreads=num_threads,
|
||||
server_name=config.APP_NAME)
|
||||
try:
|
||||
print("Using production server...")
|
||||
prod_server.start()
|
||||
except KeyboardInterrupt:
|
||||
prod_server.stop()
|
||||
app.run(
|
||||
host=config.DEFAULT_SERVER,
|
||||
port=server_port,
|
||||
use_reloader=(
|
||||
(not PGADMIN_RUNTIME) and app.debug and
|
||||
os.environ.get("WERKZEUG_RUN_MAIN") is not None
|
||||
),
|
||||
threaded=config.THREADED_MODE
|
||||
)
|
||||
|
||||
except IOError:
|
||||
app.logger.error("Error starting the app server: %s", sys.exc_info())
|
||||
|
Loading…
Reference in New Issue
Block a user