Skip to content

Crashed scheduled runs are reported as successful, with no notification #293

Description

@rfsbraz

Description

_run_deleterr (app/scheduler.py) wraps the run in a broad try/except that logs "Scheduled run failed" and then returns True ("allow retries"). The return value only gates run_on_startup retry behavior, so operationally a crashing run is indistinguishable from a successful one. And because the crash happens inside Deleterr.__init__, the notification manager never gets to send anything - failures are invisible unless the user reads container logs.

Failure Scenario

Plex token expires. Every scheduled run crashes at init, every run "completes" from the scheduler's perspective, no notification is ever sent. The user discovers weeks later that no cleanup has happened (or worse, in combination with partial-run bugs, that some libraries were processed and others never were).

Proposed Fix

  • Send a failure notification from the scheduler's exception handler (notification config is already loaded at that point)
  • Track consecutive failures; escalate the notification level after N in a row
  • Record last-run status somewhere a healthcheck can read (ties into Container HEALTHCHECK and last-run status for orchestration #294)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions