Skip to content

Commit

Permalink
Try and handle flask-socketio 5.3.0 in a docker container correctly.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Jessop authored and Mark Jessop committed Aug 29, 2022
1 parent 11ded49 commit 7f4ae41
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
2 changes: 1 addition & 1 deletion chasemapper/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@

# Now using Semantic Versioning (https://semver.org/) MAJOR.MINOR.PATCH

__version__ = "1.4.2"
__version__ = "1.4.3"
20 changes: 15 additions & 5 deletions horusmapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -1262,11 +1262,21 @@ def emit(self, record):
"Starting Chasemapper Server on: http://%s:%d/"
% (chasemapper_config["flask_host"], chasemapper_config["flask_port"])
)
socketio.run(
app,
host=chasemapper_config["flask_host"],
port=chasemapper_config["flask_port"],
)
try:
socketio.run(
app,
host=chasemapper_config["flask_host"],
port=chasemapper_config["flask_port"],
allow_unsafe_werkzeug=True
)
except TypeError as e:
print(e)
logging.debug("Not using allow_unsafe_werkzeug argument.")
socketio.run(
app,
host=chasemapper_config["flask_host"],
port=chasemapper_config["flask_port"]
)

# Close the predictor and data age monitor threads.
predictor_thread_running = False
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--no-binary eccodes
cusfpredict
flask==2.2.2
flask-socketio==5.2.0
flask
flask-socketio
lxml
numpy
python-dateutil
Expand Down

0 comments on commit 7f4ae41

Please sign in to comment.