Unblock redis locks
This commit is contained in:
@@ -13,6 +13,14 @@ TASK_STATUS = {
|
|||||||
'check_for_playlist_updates': None,
|
'check_for_playlist_updates': None,
|
||||||
'update_jellyfin_id_for_downloaded_tracks' : 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):
|
def manage_task(task_name):
|
||||||
task_id = TASK_STATUS.get(task_name)
|
task_id = TASK_STATUS.get(task_name)
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
{% extends "admin.html" %}
|
{% extends "admin.html" %}
|
||||||
{% block admin_content %}
|
{% block admin_content %}
|
||||||
<div class="container mt-5">
|
<div class="container mt-5">
|
||||||
|
|
||||||
<!-- Tabelle für den Task-Status -->
|
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -12,10 +10,27 @@
|
|||||||
<th>Action</th>
|
<th>Action</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<!-- Das Partial wird dynamisch über HTMX geladen -->
|
|
||||||
<tbody id="task-status" hx-get="/task_status" hx-trigger="every 1s" hx-swap="innerHTML">
|
<tbody id="task-status" hx-get="/task_status" hx-trigger="every 1s" hx-swap="innerHTML">
|
||||||
{% include 'partials/_task_status.html' %}
|
{% include 'partials/_task_status.html' %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
<form hx-post="/unlock_key" hx-swap="outerHTML" hx-target="#empty">
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="inputLockKey" class="form-label">Lock Key Name</label>
|
||||||
|
<select class="form-select form-select-lg mb-3" aria-label="Select task lock to unlock" id="inputLockKey" name="inputLockKey">
|
||||||
|
{% for value in lock_keys %}
|
||||||
|
<option value="{{value}}">{{value}}</option>
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
</select>
|
||||||
|
<div id="inputLockKeyHelp" class="form-text">Provide a key name to to reset a lock. </div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button type="submit" class="btn btn-primary">Unlock</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div id="empty"></div>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
Reference in New Issue
Block a user