Opened 16 years ago

Closed 15 years ago

Last modified 15 years ago

#4961 closed enhancement (fixed)

housekeeping wantToRun() too unreliable for mythfilldatabase on non-continously running master backends

Reported by: stefan.becker@… Owned by: Isaac Richards
Priority: minor Milestone: unknown
Component: mythtv Version: 0.21-fixes
Severity: low Keywords: mythfilldatabase
Cc: Ticket locked: no

Description

wantToRun() uses a randomizing formula so that not every invocation that falls into the valid window returns TRUE and therefore triggers the job. The formula makes sure that the chances of returning TRUE are getting higher and higher the closer the time approaches the end of the valid window. The housekeeping jobs are checked roughly every 5 minutes. Therefore thos approach works great when the backend is running continously.

But if the machine is set up only to wake up for recordings & mythfilldatabase runs and has a short idle shutdown period it is very likely that wantToRun() never has a chance to return TRUE. Therefore it can happen very easily that mythfilldatabase is not executed even if the machine was programmed to specifically wake up during the valid window and the last run was long enough ago.

Attachments (1)

mythtv-0.21-mythfilldatabase-check-at-startup.patch (2.7 KB) - added by stefan.becker@… 16 years ago.
Add "exact" parameter to wantToRun(); Use exact==true for mythfilldatabase in the first housekeeping run

Download all attachments as: .zip

Change History (5)

Changed 16 years ago by stefan.becker@…

Add "exact" parameter to wantToRun(); Use exact==true for mythfilldatabase in the first housekeeping run

comment:1 Changed 16 years ago by danielk

Milestone: unknown
Priority: majorminor
Severity: mediumlow
Type: defectenhancement

comment:2 Changed 15 years ago by cpinkham

Resolution: fixed
Status: newclosed

(In [21385]) Allow the housekeeper to run mythfilldatabase when the backend is first started if:

1) we are in the mythfilldatabase time window 2) it has been long enough since the last run 3) the backend was started automatically

For users using the ability to shutdown the master backend when idle and automatically wakeup for the next recording, mythfilldatabase may rarely get a chance to run because of the randomization logic we apply to determine when to run a job.

Closes #4961 with a patch that slightly resembles the original by Stefan Becker

comment:3 Changed 15 years ago by cpinkham

(In [21393]) Fix an erroneous error message I added in [21385]. The MythShutdownWakeupTime? setting value can be either valid, invalid, or empty. empty != invalid.

References #4961.

comment:4 Changed 15 years ago by cpinkham

(In [21398]) Revert a modification I made to Stefan's patch in [21385]. If we only let mythfilldatabase run when the master backend is woken up automatically, then we may not run mythfilldatabase on days when there are no recordings if the backend is only powered on for a short time manually.

Closes #6879, and References #4961.

Note: See TracTickets for help on using tickets.