Modify

Ticket #4961 (closed enhancement: fixed)

Opened 5 years ago

Last modified 4 years ago

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

Reported by: stefan.becker@… Owned by: ijr
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

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

Change History

Changed 5 years ago by stefan.becker@…

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

comment:1 Changed 5 years ago by danielk

  • Priority changed from major to minor
  • Type changed from defect to enhancement
  • Severity changed from medium to low
  • Milestone set to unknown

comment:2 Changed 4 years ago by cpinkham

  • Status changed from new to closed
  • Resolution set to fixed

(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 4 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 4 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.

View

Add a comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.