Skip to content

Commit 112f280

Browse files
authored
v3.2.0 (#149)
1 parent a884af3 commit 112f280

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

CHANGELOG.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,13 @@ Using the following categories, list your changes in this order:
3434

3535
## [Unreleased]
3636

37+
- Nothing (yet)
38+
39+
## [3.2.0] - 2023-06-08
40+
3741
### Added
3842

39-
- Added warning if poor system/cache/database performance is detected.
43+
- Added warning if poor system/cache/database performance is detected while in `DEBUG` mode.
4044
- Added `REACTPY_AUTH_BACKEND` setting to allow for custom authentication backends.
4145

4246
### Changed
@@ -285,7 +289,8 @@ Using the following categories, list your changes in this order:
285289

286290
- Support for IDOM within the Django
287291

288-
[unreleased]: https://github.com/reactive-python/reactpy-django/compare/3.1.0...HEAD
292+
[unreleased]: https://github.com/reactive-python/reactpy-django/compare/3.2.0...HEAD
293+
[3.2.0]: https://github.com/reactive-python/reactpy-django/compare/3.1.0...3.2.0
289294
[3.1.0]: https://github.com/reactive-python/reactpy-django/compare/3.0.1...3.1.0
290295
[3.0.1]: https://github.com/reactive-python/reactpy-django/compare/3.0.0-reactpy...3.0.1
291296
[3.0.0-reactpy]: https://github.com/reactive-python/reactpy-django/compare/3.0.0...3.0.0-reactpy

src/reactpy_django/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from reactpy_django.websocket.paths import REACTPY_WEBSOCKET_PATH
33

44

5-
__version__ = "3.1.0"
5+
__version__ = "3.2.0"
66
__all__ = [
77
"REACTPY_WEBSOCKET_PATH",
88
"hooks",

src/reactpy_django/utils.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,12 @@ def create_cache_key(*args):
313313
def db_cleanup(immediate: bool = False):
314314
"""Deletes expired component sessions from the database.
315315
This function may be expanded in the future to include additional cleanup tasks."""
316-
from .config import REACTPY_CACHE, REACTPY_DATABASE, REACTPY_RECONNECT_MAX
316+
from .config import (
317+
REACTPY_CACHE,
318+
REACTPY_DATABASE,
319+
REACTPY_DEBUG_MODE,
320+
REACTPY_RECONNECT_MAX,
321+
)
317322
from .models import ComponentSession
318323

319324
clean_started_at = datetime.now()
@@ -344,7 +349,7 @@ def db_cleanup(immediate: bool = False):
344349

345350
# Check if cleaning took abnormally long
346351
clean_duration = datetime.now() - clean_started_at
347-
if clean_duration.total_seconds() > 1:
352+
if REACTPY_DEBUG_MODE and clean_duration.total_seconds() > 1:
348353
_logger.warning(
349354
"ReactPy has taken %s seconds to clean up expired component sessions. "
350355
"This may indicate a performance issue with your system, cache, or database.",

0 commit comments

Comments
 (0)