Skip to content

Commit ef4e816

Browse files
committed
Add test settings to resolve tasks immediately
1 parent 54fd5b4 commit ef4e816

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

rca/settings/test.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,12 @@
2323
STORAGES["staticfiles"][ # noqa
2424
"BACKEND"
2525
] = "django.contrib.staticfiles.storage.StaticFilesStorage"
26+
27+
# Resolve tasks immediately
28+
# https://docs.wagtail.org/en/stable/releases/6.4.html#background-tasks-run-at-end-of-current-transaction
29+
TASKS = {
30+
"default": {
31+
"BACKEND": "django_tasks.backends.immediate.ImmediateBackend",
32+
"ENQUEUE_ON_COMMIT": False,
33+
}
34+
}

0 commit comments

Comments
 (0)