diff --git a/CHANGELOG.md b/CHANGELOG.md index 666046cc..14321319 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,22 @@ # CHANGELOG +## v5.6.6-rc.2 (2025-04-11) + +### Bug Fixes + +- **deps**: Update deps, fixes windows tests + ([`861ee0d`](https://github.com/Geode-solutions/OpenGeodeWeb-Back/commit/861ee0d7d157e995f271b1e8e8d3422bc3260ea0)) + + +## v5.6.6-rc.1 (2025-04-11) + +### Bug Fixes + +- **server timeout**: Timeout 0 = infinite + ([`8db3eef`](https://github.com/Geode-solutions/OpenGeodeWeb-Back/commit/8db3eef5c07ce5827ce689b9fad433739f045418)) + + ## v5.6.5 (2025-04-09) diff --git a/pyproject.toml b/pyproject.toml index 7cc0ceda..3f5464d5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta" [project] name = "OpenGeodeWeb-Back" -version = "5.6.5" +version = "5.6.6-rc.2" dynamic = ["dependencies"] authors = [ { name="Geode-solutions", email="team-web@geode-solutions.com" }, diff --git a/requirements.txt b/requirements.txt index 621274ca..2f112fe7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.11 +# This file is autogenerated by pip-compile with Python 3.10 # by the following command: # # pip-compile requirements.in @@ -14,20 +14,18 @@ blinker==1.9.0 # via flask click==8.1.8 # via flask -colorama==0.4.6 - # via click flask[async]==3.1.0 # via # -r requirements.in # flask-cors flask-cors==5.0.1 # via -r requirements.in -geode-background==9.1.3 +geode-background==9.1.5 # via # geode-explicit # geode-implicit # geode-simplex -geode-common==33.7.0 +geode-common==33.7.2 # via # -r requirements.in # geode-background @@ -37,23 +35,23 @@ geode-common==33.7.0 # geode-numerics # geode-simplex # geode-viewables -geode-conversion==6.2.6 +geode-conversion==6.2.7 # via # geode-explicit # geode-implicit # geode-simplex -geode-explicit==6.1.34 +geode-explicit==6.1.35 # via # -r requirements.in # geode-implicit -geode-implicit==3.7.3 +geode-implicit==3.7.4 # via -r requirements.in -geode-numerics==6.0.2 +geode-numerics==6.0.3 # via # -r requirements.in # geode-implicit # geode-simplex -geode-simplex==9.2.3 +geode-simplex==9.2.5 # via # -r requirements.in # geode-implicit @@ -71,7 +69,7 @@ markupsafe==3.0.2 # via # jinja2 # werkzeug -opengeode-core==15.17.7 +opengeode-core==15.17.8 # via # -r requirements.in # geode-background @@ -116,7 +114,7 @@ rpds-py==0.24.0 # via # jsonschema # referencing -typing-extensions==4.13.1 +typing-extensions==4.13.2 # via # asgiref # referencing diff --git a/src/opengeodeweb_back/app_config.py b/src/opengeodeweb_back/app_config.py index 6bbb0b1d..a4e87fc2 100644 --- a/src/opengeodeweb_back/app_config.py +++ b/src/opengeodeweb_back/app_config.py @@ -12,7 +12,6 @@ class Config(object): DEFAULT_PORT = "5000" CORS_HEADERS = "Content-Type" UPLOAD_FOLDER = "./uploads" - DESKTOP_APP = False REQUEST_COUNTER = 0 LAST_REQUEST_TIME = time.time() LAST_PING_TIME = time.time() diff --git a/src/opengeodeweb_back/utils_functions.py b/src/opengeodeweb_back/utils_functions.py index e19e744f..41cedcb8 100644 --- a/src/opengeodeweb_back/utils_functions.py +++ b/src/opengeodeweb_back/utils_functions.py @@ -43,7 +43,6 @@ def teardown_request(current_app): def kill_task(current_app): - DESKTOP_APP = bool(current_app.config.get("DESKTOP_APP")) REQUEST_COUNTER = int(current_app.config.get("REQUEST_COUNTER")) LAST_PING_TIME = float(current_app.config.get("LAST_PING_TIME")) LAST_REQUEST_TIME = float(current_app.config.get("LAST_REQUEST_TIME")) @@ -52,15 +51,19 @@ def kill_task(current_app): minutes_since_last_request = (current_time - LAST_REQUEST_TIME) / 60 minutes_since_last_ping = (current_time - LAST_PING_TIME) / 60 - if ( - ( - (minutes_since_last_request > MINUTES_BEFORE_TIMEOUT) - and (DESKTOP_APP == False) - ) - or (minutes_since_last_ping > MINUTES_BEFORE_TIMEOUT) - ) and (REQUEST_COUNTER == 0): - print("Server timed out due to inactivity, shutting down...", flush=True) - os._exit(0) + if REQUEST_COUNTER > 0: + return + if MINUTES_BEFORE_TIMEOUT == 0: + return + if minutes_since_last_ping > MINUTES_BEFORE_TIMEOUT: + kill_server() + if minutes_since_last_request > MINUTES_BEFORE_TIMEOUT: + kill_server() + + +def kill_server(): + print("Server timed out due to inactivity, shutting down...", flush=True) + os._exit(0) def versions(list_packages: list):