From 32be2571720bafa6712d0ad91cd519483bd987df Mon Sep 17 00:00:00 2001 From: Klaas van Schelven Date: Thu, 23 Oct 2025 22:04:17 +0200 Subject: [PATCH] Fail to start when using non-sqlite for snappea See #252 This is not backwards compatible (it will now hard-break), but given snappea's rather particular design decisions this is probably for the best, and given what else was just discovered on #252 I strongly doubt anyone was actually using it in such setups anyway. --- snappea/__init__.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/snappea/__init__.py b/snappea/__init__.py index dc2870c..da76f73 100644 --- a/snappea/__init__.py +++ b/snappea/__init__.py @@ -67,3 +67,13 @@ def check_no_nested_settings_in_unnested_form(app_configs, **kwargs): id="snappea.W001", )) return errors + + +@register("snappea") +def check_using_sqlite(app_configs, **kwargs): + if "sqlite" not in django_settings.DATABASES['snappea']['ENGINE']: # covers both timed_sqlite_backend and sqlite3 + return [Warning( + "The snappea 'database' backend (queue really) is not set to use SQLite. It should be.", id="snappea.W002", + )] + + return []