Add SQLITE_DELAY_FLOAT setting

This commit is contained in:
tcely 2025-04-17 03:24:05 -04:00 committed by GitHub
parent b1e7f0eed2
commit 035eeea54c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -59,6 +59,12 @@ else:
}
DATABASE_CONNECTION_STR = f'sqlite at "{DATABASES["default"]["NAME"]}"'
# the argument to random.expovariate(),
# a larger value means less delay
# with too little delay, you may see
# more "database is locked" errors
SQLITE_DELAY_FLOAT = 1.5
DEFAULT_THREADS = 1
BACKGROUND_TASK_ASYNC_THREADS = getenv('TUBESYNC_WORKERS', DEFAULT_THREADS, integer=True)