Skip to content

Trigger now fails after scheduled rule execution: “Collection handling is already running” #2799

@darkparanor

Description

@darkparanor

I am using Maintainerr 3.8.0 and I configured several rules/collections with Sonarr actions.

The issue happens when I try to manually run the action using Trigger now from the collection/item page.

Maintainerr shows the following error:

Collection handling is already running. Try again when the current collection or rule execution finishes.

In the UI logs I also see repeated errors like:

9:29:12 AM ERROR Failed to trigger the collection action for this item.
TriggerRuleButton.handleTriggerAction
9:29:13 AM ERROR Failed to trigger the collection action for this item.
TriggerRuleButton.handleTriggerAction
9:29:13 AM ERROR Failed to trigger the collection action for this item.
TriggerRuleButton.handleTriggerAction
9:29:13 AM ERROR Failed to trigger the collection action for this item.
TriggerRuleButton.handleTriggerAction

This happens for every collection where I try to manually trigger the action.
The same scheduled actions when should be trigger does not do anything

If I restart the Maintainerr container/application, the manual trigger works again for a while. However, after the normal scheduled rules run, the same problem comes back and the manual trigger fails again with the same message.

It looks like Maintainerr may think that collection handling or rule execution is still running, even after the scheduled execution has already completed.

To Reproduce

Steps to reproduce the behavior:

Create one or more collections/rules in Maintainerr 3.8.0.
Configure a Sonarr action, for example:
Media type: Seasons
Sonarr action: Unmonitor season and keep files
Let the normal scheduled rules run.
Open a collection/item that matches the rule.
Click Trigger now.
The action fails and Maintainerr shows:
Collection handling is already running. Try again when the current collection or rule execution finishes.
Restart Maintainerr.
Try Trigger now again: it works.
Wait until the scheduled rules run again.
Try Trigger now again: the same error returns.

Expected behavior

I would expect Trigger now to run the selected collection action when no collection handling or rule execution is actually running.

If a collection/rule execution is really still running, I would expect it to finish and then allow manual triggering again.

Screenshots

I attached screenshots showing:

The error message displayed by Maintainerr:
Collection handling is already running. Try again when the current collection or rule execution finishes.
The configured collection/action:
Library: Programmi TV
Media type: Seasons
Sonarr server: raspsonarr
Sonarr action: Unmonitor season and keep files
Take action after days: 3
Example rules used in the collection:
Sonarr - Status (continuing, ended) equals Continuing
Sonarr - Has unaired episodes equals False
Sonarr - Has season finale episode equals True
Sonarr - Number of missing episodes in season equals 0
UI log entries showing repeated Failed to trigger the collection action for this item errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions