Opened 16 months ago

Last modified 16 months ago

#13604 new Bug Report - General

Blocking shutdown because of active jobs vs. JobQueueWindow

Reported by: pmhahn Owned by:
Priority: minor Milestone: needs_triage
Component: MythTV - General Version: v31-fixes
Severity: low Keywords: jobqueue
Cc: Ticket locked: no


To save power I have configured MytvTV to shutdown in the night. I had also configured a JobQueueWindows to prevent jobs from starting very late as I find it okay to delay the jobs until MythTV is next woken up.

JobQueueWindowStart	07:00
JobQueueWindowEnd	23:00

This morning I noticed that the box was still running. Yesterday evening there was a late recording which ended just after the JobQueueWindows closed:

2020-04-07 23:15:00.521679 N Finished Recording: Container: MPEG2-TS Video Codec: mpeg2video (720x576 A/R: 3 25fps) Audio Codec: ac3

Looking at journalctl -u mythtv-backend.service I found the following message repeated multiple times:

2020-04-07 23:15:00.567976 N Blocking shutdown because of active jobs

To me this looks like the newly added jobs to lookup Metadata and to transcode the recording blocked MythTV from shutting down for the night.

It would be nice if MythTV would no block the shutdown because of pending jobs. Optionally make it configurable like

  • block shutdown if there are pending jobs
  • delay jobs until next start (whenever that might be)
  • delay jobs until next start and schedule wakeup for next JobQueueWindowsStart
  • allow to delay running the job up to X hours

For now I disabled the Job Queue windows.

Change History (1)

comment:1 Changed 16 months ago by Stuart Auchterlonie

In theory it should be easy enough to improve the check for active jobs to take into consideration the JobQueueWindow? and realize the jobs can't be run at the current time

Note: See TracTickets for help on using tickets.