mirror of
https://github.com/sissbruecker/linkding.git
synced 2025-08-07 02:48:27 +02:00
Create snapshots on web.archive.org for bookmarks (#150)
* Implement initial background tasks concept * fix property reference * update requirements.txt * simplify bookmark null check * improve web archive url display * add background tasks test * add basic supervisor setup * schedule missing snapshot creation on login * remove task locks and clear task history before starting background task processor * batch create snapshots after import * fix script reference in supervisord.conf * add option to disable background tasks * restructure feature overview
This commit is contained in:
@@ -42,6 +42,7 @@ INSTALLED_APPS = [
|
||||
'django_generate_secret_key',
|
||||
'rest_framework',
|
||||
'rest_framework.authtoken',
|
||||
'background_task',
|
||||
]
|
||||
|
||||
MIDDLEWARE = [
|
||||
@@ -166,3 +167,14 @@ ALLOW_REGISTRATION = False
|
||||
|
||||
# URL validation flag
|
||||
LD_DISABLE_URL_VALIDATION = os.getenv('LD_DISABLE_URL_VALIDATION', False) in (True, 'True', '1')
|
||||
|
||||
# Background task enabled setting
|
||||
LD_DISABLE_BACKGROUND_TASKS = os.getenv('LD_DISABLE_BACKGROUND_TASKS', False) in (True, 'True', '1')
|
||||
|
||||
# django-background-tasks
|
||||
MAX_ATTEMPTS = 5
|
||||
# How many tasks will run in parallel
|
||||
# We want to keep this low to prevent SQLite lock errors and in general not to consume too much resources on smaller
|
||||
# specced systems like Raspberries. Should be OK as tasks are not time critical.
|
||||
BACKGROUND_TASK_RUN_ASYNC = True
|
||||
BACKGROUND_TASK_ASYNC_THREADS = 2
|
||||
|
Reference in New Issue
Block a user