Skip to content

v3.2.0 #149

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 23, 2023
Merged
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
9 changes: 7 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,13 @@ Using the following categories, list your changes in this order:

## [Unreleased]

- Nothing (yet)

## [3.2.0] - 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.
- Added `REACTPY_AUTH_BACKEND` setting to allow for custom authentication backends.

### Changed
Expand Down Expand Up @@ -285,7 +289,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.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
Expand Down
2 changes: 1 addition & 1 deletion src/reactpy_django/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from reactpy_django.websocket.paths import REACTPY_WEBSOCKET_PATH


__version__ = "3.1.0"
__version__ = "3.2.0"
__all__ = [
"REACTPY_WEBSOCKET_PATH",
"hooks",
Expand Down
9 changes: 7 additions & 2 deletions src/reactpy_django/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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.",
Expand Down