From 16e1a8a58d93fd8f5c29c3fe831748d9a3edd230 Mon Sep 17 00:00:00 2001 From: Kamil Date: Tue, 26 Nov 2024 15:09:29 +0000 Subject: [PATCH] Unblock redis locks --- app/functions.py | 8 ++++++++ templates/admin/tasks.html | 21 ++++++++++++++++++--- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/app/functions.py b/app/functions.py index 01c38fd..3642417 100644 --- a/app/functions.py +++ b/app/functions.py @@ -13,6 +13,14 @@ TASK_STATUS = { 'check_for_playlist_updates': None, 'update_jellyfin_id_for_downloaded_tracks' : None } +LOCK_KEYS = [ + 'update_all_playlists_track_status_lock', + 'download_missing_tracks_lock', + 'check_for_playlist_updates_lock', + 'update_jellyfin_id_for_downloaded_tracks_lock' , + 'full_update_jellyfin_ids' + +] def manage_task(task_name): task_id = TASK_STATUS.get(task_name) diff --git a/templates/admin/tasks.html b/templates/admin/tasks.html index 4815c4c..ef6670e 100644 --- a/templates/admin/tasks.html +++ b/templates/admin/tasks.html @@ -1,8 +1,6 @@ {% extends "admin.html" %} {% block admin_content %}
- - @@ -12,10 +10,27 @@ - {% include 'partials/_task_status.html' %}
Action
+
+
+
+ + +
Provide a key name to to reset a lock.
+
+ + +
+
+
+ {% endblock %}