improve sabt factor

This commit is contained in:
javad committed 2026-06-23 22:10:12 +03:30
1 parent 96dd277f6b
commit 1672de549a
2 files changed
+223 -219

No files matched your search

+7
View File
@@ -4,5 +4,12 @@ DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': Path('/app/sqlite/db.sqlite3'),
'OPTIONS': {
# ۱. افزایش زمان انتظار (Timeout) به ثانیه
# با این کار اگر دیتابیس قفل باشد، کاربر دوم کرش نمی‌کند بلکه تا ۳۰ ثانیه منتظر باز شدن قفل می‌ماند
'timeout': 30,
# ۲. فعال‌سازی حالت WAL برای بالا بردن قدرت پردازش هم‌زمانی در SQLite
'init_command': 'PRAGMA journal_mode=WAL;',
},
}
}