Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)


Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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="[email protected]" },
Expand Down
22 changes: 10 additions & 12 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion src/opengeodeweb_back/app_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
23 changes: 13 additions & 10 deletions src/opengeodeweb_back/utils_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand All @@ -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):
Expand Down