Skip to content

fixes #407 [Lidarr] Exclude isLongRunning commands from LidarrTaskStatusCheck#409

Open
barrettclark wants to merge 2 commits intoRandomNinjaAtk:mainfrom
barrettclark:fix/lidarr-task-status-check
Open

fixes #407 [Lidarr] Exclude isLongRunning commands from LidarrTaskStatusCheck#409
barrettclark wants to merge 2 commits intoRandomNinjaAtk:mainfrom
barrettclark:fix/lidarr-task-status-check

Conversation

@barrettclark
Copy link
Copy Markdown

Fixes #407

Problem

ProcessMonitoredDownloads is a Lidarr internal background task with isLongRunning: true that runs continuously and never completes. The LidarrTaskStatusCheck function counted all started commands, so the Audio script would wait indefinitely whenever this task was running — blocking all downloads.

Fix

Filter out commands with isLongRunning: true from the task count, so only user-initiated tasks (like RefreshArtist, DownloadedAlbumsScan, MoveArtist) block the script.

# Before
taskCount=$(... | jq -r '.[] | select(.status=="started") | .name' | wc -l)

# After
taskCount=$(... | jq '[.[] | select(.status=="started") | select(.body.isLongRunning != true)] | length')

… LidarrTaskStatusCheck

ProcessMonitoredDownloads is a Lidarr background task with isLongRunning=true
that never completes. The previous jq filter counted all started commands,
causing the Audio script to wait forever. Filter out long-running tasks so
only user-initiated commands block the script.
…ngRunning

DownloadedAlbumsScan is also isLongRunning=true and must be waited on —
it triggers the actual album import. Excluding all isLongRunning commands
was too broad. Exclude ProcessMonitoredDownloads by name specifically.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] [Lidarr] LidarrTaskStatusCheck hangs indefinitely when ProcessMonitoredDownloads is running

1 participant