Skip to content

Commit 90a6308

Browse files
committed
rename clean module to tasks
1 parent 1a4fcaa commit 90a6308

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/reactpy_django/management/commands/clean_reactpy.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class Command(BaseCommand):
1010
help = "Manually clean ReactPy data. When using this command without args, it will perform all cleaning operations."
1111

1212
def handle(self, **options):
13-
from reactpy_django.clean import clean
13+
from reactpy_django.tasks import clean
1414

1515
verbosity = options.get("verbosity", 1)
1616

File renamed without changes.

src/reactpy_django/websocket/consumer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from reactpy.core.layout import Layout
2222
from reactpy.core.serve import serve_layout
2323

24-
from reactpy_django.clean import clean
24+
from reactpy_django.tasks import clean
2525
from reactpy_django.utils import ensure_async
2626

2727
if TYPE_CHECKING:

tests/test_app/tests/test_database.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import dill
77
from django.test import TransactionTestCase
88

9-
from reactpy_django import clean
9+
from reactpy_django import tasks
1010
from reactpy_django.models import ComponentSession, UserDataModel
1111
from reactpy_django.types import ComponentParams
1212

@@ -29,7 +29,7 @@ def test_component_params(self):
2929
config.REACTPY_CLEAN_USER_DATA = False
3030

3131
try:
32-
clean.clean(immediate=True)
32+
tasks.clean(immediate=True)
3333

3434
# Make sure the ComponentParams table is empty
3535
assert ComponentSession.objects.count() == 0
@@ -48,7 +48,7 @@ def test_component_params(self):
4848

4949
# Try to delete the `params_1` via cleaning (it should be expired)
5050
# Note: We don't use `immediate` here in order to test timestamping logic
51-
clean.clean()
51+
tasks.clean()
5252

5353
# Make sure `params_1` has expired, but `params_2` is still there
5454
assert ComponentSession.objects.count() == 1
@@ -98,7 +98,7 @@ def test_user_data_cleanup(self):
9898

9999
# Make sure the orphaned user data object is deleted
100100
assert UserDataModel.objects.count() == initial_count + 1
101-
clean.clean_user_data()
101+
tasks.clean_user_data()
102102
assert UserDataModel.objects.count() == initial_count
103103

104104
# Check if deleting a user deletes the associated UserData

0 commit comments

Comments
 (0)