reactive-python / reactpy-django

It's React, but in Python. Now with Django integration.
https://reactive-python.github.io/reactpy-django/
MIT License
322 stars 18 forks source link

Add robust cleanup settings #206

Closed Archmonger closed 6 months ago

Archmonger commented 7 months ago

Current Situation

Currently cleanup tasks are handled automatically on WS disconnect. If a user defined time period has passed, then Django ReactPy will attempt to clean up all expired data.

Proposed Actions

Add configurability for cleanup behavior. For example, we might want the following settings that can enable/disable certain cleaning behaviors.

REACTPY_CLEAN_SESSIONS: bool
REACTPY_CLEAN_USER_DATA: bool
REACTPY_CLEAN_AUTH_SESSIONS: bool # Future feature, not yet relevant.
REACTPY_AUTO_CLEAN_INTERVAL: bool

And also a management command to forcibly perform a clean.

python manage.py reactpy_cleanup