From 106e97761049c387711c3e426ebea8775255eb6b Mon Sep 17 00:00:00 2001 From: Archmonger <16909269+Archmonger@users.noreply.github.com> Date: Thu, 8 Jun 2023 03:13:33 -0700 Subject: [PATCH 1/3] v3.1.1 --- CHANGELOG.md | 9 +++++++-- src/reactpy_django/__init__.py | 2 +- src/reactpy_django/utils.py | 9 +++++++-- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 06f30dff..9557cb12 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,9 +34,13 @@ Using the following categories, list your changes in this order: ## [Unreleased] +- Nothing (yet) + +## [3.1.1] - 2023-06-08 + ### Added -- Added warning if poor system/cache/database performance is detected. +- Added warning if poor system/cache/database performance is detected while in `DEBUG` mode. ## [3.1.0] - 2023-05-06 @@ -279,7 +283,8 @@ Using the following categories, list your changes in this order: - Support for IDOM within the Django -[unreleased]: https://github.com/reactive-python/reactpy-django/compare/3.1.0...HEAD +[unreleased]: https://github.com/reactive-python/reactpy-django/compare/3.1.1...HEAD +[3.1.1]: https://github.com/reactive-python/reactpy-django/compare/3.1.0...3.1.1 [3.1.0]: https://github.com/reactive-python/reactpy-django/compare/3.0.1...3.1.0 [3.0.1]: https://github.com/reactive-python/reactpy-django/compare/3.0.0-reactpy...3.0.1 [3.0.0-reactpy]: https://github.com/reactive-python/reactpy-django/compare/3.0.0...3.0.0-reactpy diff --git a/src/reactpy_django/__init__.py b/src/reactpy_django/__init__.py index 195626aa..3b1b2302 100644 --- a/src/reactpy_django/__init__.py +++ b/src/reactpy_django/__init__.py @@ -2,7 +2,7 @@ from reactpy_django.websocket.paths import REACTPY_WEBSOCKET_PATH -__version__ = "3.1.0" +__version__ = "3.1.1" __all__ = [ "REACTPY_WEBSOCKET_PATH", "hooks", diff --git a/src/reactpy_django/utils.py b/src/reactpy_django/utils.py index c44429ee..da973a60 100644 --- a/src/reactpy_django/utils.py +++ b/src/reactpy_django/utils.py @@ -313,7 +313,12 @@ def create_cache_key(*args): def db_cleanup(immediate: bool = False): """Deletes expired component sessions from the database. This function may be expanded in the future to include additional cleanup tasks.""" - from .config import REACTPY_CACHE, REACTPY_DATABASE, REACTPY_RECONNECT_MAX + from .config import ( + REACTPY_CACHE, + REACTPY_DATABASE, + REACTPY_DEBUG_MODE, + REACTPY_RECONNECT_MAX, + ) from .models import ComponentSession clean_started_at = datetime.now() @@ -344,7 +349,7 @@ def db_cleanup(immediate: bool = False): # Check if cleaning took abnormally long clean_duration = datetime.now() - clean_started_at - if clean_duration.total_seconds() > 1: + if REACTPY_DEBUG_MODE and clean_duration.total_seconds() > 1: _logger.warning( "ReactPy has taken %s seconds to clean up expired component sessions. " "This may indicate a performance issue with your system, cache, or database.", From 5dbcb39f8700bd4c20bb046a2e00e717f0905309 Mon Sep 17 00:00:00 2001 From: Archmonger <16909269+Archmonger@users.noreply.github.com> Date: Fri, 23 Jun 2023 15:22:21 -0700 Subject: [PATCH 2/3] 3.2.0 --- CHANGELOG.md | 6 +++--- src/reactpy_django/__init__.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 55101a9c..ea5314d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,7 +36,7 @@ Using the following categories, list your changes in this order: - Nothing (yet) -## [3.1.1] - 2023-06-08 +## [3.2.0] - 2023-06-08 ### Added @@ -290,8 +290,8 @@ Using the following categories, list your changes in this order: - Support for IDOM within the Django -[unreleased]: https://github.com/reactive-python/reactpy-django/compare/3.1.1...HEAD -[3.1.1]: https://github.com/reactive-python/reactpy-django/compare/3.1.0...3.1.1 +[unreleased]: https://github.com/reactive-python/reactpy-django/compare/3.2.0...HEAD +[3.2.0]: https://github.com/reactive-python/reactpy-django/compare/3.1.0...3.2.0 [3.1.0]: https://github.com/reactive-python/reactpy-django/compare/3.0.1...3.1.0 [3.0.1]: https://github.com/reactive-python/reactpy-django/compare/3.0.0-reactpy...3.0.1 [3.0.0-reactpy]: https://github.com/reactive-python/reactpy-django/compare/3.0.0...3.0.0-reactpy diff --git a/src/reactpy_django/__init__.py b/src/reactpy_django/__init__.py index 3b1b2302..0d8bb188 100644 --- a/src/reactpy_django/__init__.py +++ b/src/reactpy_django/__init__.py @@ -2,7 +2,7 @@ from reactpy_django.websocket.paths import REACTPY_WEBSOCKET_PATH -__version__ = "3.1.1" +__version__ = "3.2.0" __all__ = [ "REACTPY_WEBSOCKET_PATH", "hooks", From a7692529e7db93da4556f549570b31633918c046 Mon Sep 17 00:00:00 2001 From: Archmonger <16909269+Archmonger@users.noreply.github.com> Date: Fri, 23 Jun 2023 15:23:50 -0700 Subject: [PATCH 3/3] remove duplicate changelog entry --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ea5314d9..dcda688d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,7 +41,6 @@ Using the following categories, list your changes in this order: ### Added - Added warning if poor system/cache/database performance is detected while in `DEBUG` mode. -- Added warning if poor system/cache/database performance is detected. - Added `REACTPY_AUTH_BACKEND` setting to allow for custom authentication backends. ### Changed