Skip to content

Commit 5c617ef

Browse files
Merge pull request #136 from Geode-solutions/next
No commit message
2 parents 8200eb2 + f9aef56 commit 5c617ef

File tree

5 files changed

+40
-24
lines changed

5 files changed

+40
-24
lines changed

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
11
# CHANGELOG
22

33

4+
## v5.6.6-rc.2 (2025-04-11)
5+
6+
### Bug Fixes
7+
8+
- **deps**: Update deps, fixes windows tests
9+
([`861ee0d`](https://github.com/Geode-solutions/OpenGeodeWeb-Back/commit/861ee0d7d157e995f271b1e8e8d3422bc3260ea0))
10+
11+
12+
## v5.6.6-rc.1 (2025-04-11)
13+
14+
### Bug Fixes
15+
16+
- **server timeout**: Timeout 0 = infinite
17+
([`8db3eef`](https://github.com/Geode-solutions/OpenGeodeWeb-Back/commit/8db3eef5c07ce5827ce689b9fad433739f045418))
18+
19+
420
## v5.6.5 (2025-04-09)
521

622

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
55

66
[project]
77
name = "OpenGeodeWeb-Back"
8-
version = "5.6.5"
8+
version = "5.6.6-rc.2"
99
dynamic = ["dependencies"]
1010
authors = [
1111
{ name="Geode-solutions", email="[email protected]" },

requirements.txt

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# This file is autogenerated by pip-compile with Python 3.11
2+
# This file is autogenerated by pip-compile with Python 3.10
33
# by the following command:
44
#
55
# pip-compile requirements.in
@@ -14,20 +14,18 @@ blinker==1.9.0
1414
# via flask
1515
click==8.1.8
1616
# via flask
17-
colorama==0.4.6
18-
# via click
1917
flask[async]==3.1.0
2018
# via
2119
# -r requirements.in
2220
# flask-cors
2321
flask-cors==5.0.1
2422
# via -r requirements.in
25-
geode-background==9.1.3
23+
geode-background==9.1.5
2624
# via
2725
# geode-explicit
2826
# geode-implicit
2927
# geode-simplex
30-
geode-common==33.7.0
28+
geode-common==33.7.2
3129
# via
3230
# -r requirements.in
3331
# geode-background
@@ -37,23 +35,23 @@ geode-common==33.7.0
3735
# geode-numerics
3836
# geode-simplex
3937
# geode-viewables
40-
geode-conversion==6.2.6
38+
geode-conversion==6.2.7
4139
# via
4240
# geode-explicit
4341
# geode-implicit
4442
# geode-simplex
45-
geode-explicit==6.1.34
43+
geode-explicit==6.1.35
4644
# via
4745
# -r requirements.in
4846
# geode-implicit
49-
geode-implicit==3.7.3
47+
geode-implicit==3.7.4
5048
# via -r requirements.in
51-
geode-numerics==6.0.2
49+
geode-numerics==6.0.3
5250
# via
5351
# -r requirements.in
5452
# geode-implicit
5553
# geode-simplex
56-
geode-simplex==9.2.3
54+
geode-simplex==9.2.5
5755
# via
5856
# -r requirements.in
5957
# geode-implicit
@@ -71,7 +69,7 @@ markupsafe==3.0.2
7169
# via
7270
# jinja2
7371
# werkzeug
74-
opengeode-core==15.17.7
72+
opengeode-core==15.17.8
7573
# via
7674
# -r requirements.in
7775
# geode-background
@@ -116,7 +114,7 @@ rpds-py==0.24.0
116114
# via
117115
# jsonschema
118116
# referencing
119-
typing-extensions==4.13.1
117+
typing-extensions==4.13.2
120118
# via
121119
# asgiref
122120
# referencing

src/opengeodeweb_back/app_config.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ class Config(object):
1212
DEFAULT_PORT = "5000"
1313
CORS_HEADERS = "Content-Type"
1414
UPLOAD_FOLDER = "./uploads"
15-
DESKTOP_APP = False
1615
REQUEST_COUNTER = 0
1716
LAST_REQUEST_TIME = time.time()
1817
LAST_PING_TIME = time.time()

src/opengeodeweb_back/utils_functions.py

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ def teardown_request(current_app):
4343

4444

4545
def kill_task(current_app):
46-
DESKTOP_APP = bool(current_app.config.get("DESKTOP_APP"))
4746
REQUEST_COUNTER = int(current_app.config.get("REQUEST_COUNTER"))
4847
LAST_PING_TIME = float(current_app.config.get("LAST_PING_TIME"))
4948
LAST_REQUEST_TIME = float(current_app.config.get("LAST_REQUEST_TIME"))
@@ -52,15 +51,19 @@ def kill_task(current_app):
5251
minutes_since_last_request = (current_time - LAST_REQUEST_TIME) / 60
5352
minutes_since_last_ping = (current_time - LAST_PING_TIME) / 60
5453

55-
if (
56-
(
57-
(minutes_since_last_request > MINUTES_BEFORE_TIMEOUT)
58-
and (DESKTOP_APP == False)
59-
)
60-
or (minutes_since_last_ping > MINUTES_BEFORE_TIMEOUT)
61-
) and (REQUEST_COUNTER == 0):
62-
print("Server timed out due to inactivity, shutting down...", flush=True)
63-
os._exit(0)
54+
if REQUEST_COUNTER > 0:
55+
return
56+
if MINUTES_BEFORE_TIMEOUT == 0:
57+
return
58+
if minutes_since_last_ping > MINUTES_BEFORE_TIMEOUT:
59+
kill_server()
60+
if minutes_since_last_request > MINUTES_BEFORE_TIMEOUT:
61+
kill_server()
62+
63+
64+
def kill_server():
65+
print("Server timed out due to inactivity, shutting down...", flush=True)
66+
os._exit(0)
6467

6568

6669
def versions(list_packages: list):

0 commit comments

Comments
 (0)