Opened 6 years ago

Closed 6 years ago

Last modified 4 years ago

#12101 closed Patch - Bug Fix (fixed)

MythFillDB should use the run time the provider suggested

Reported by: Frank Phillips <fphillips81@…> Owned by: Raymond Wagner
Priority: minor Milestone: 0.27.6
Component: MythTV - Housekeeper Version: 0.27-fixes
Severity: medium Keywords:
Cc: Ticket locked: no

Description

In mythtv-setup, the help text of MythFillGrabberSuggestsTime? says this option is mutually exclusive with the FillDB hour window settings. This intention was probably lost with the housekeeper rewrite in May.

programs/mythbackend/backendhousekeeper.cpp: MythFillDatabaseTask::DoCheckRun?

Currently, when MythFillGrabberSuggestsTime? is enabled, the MythFillDB task will only be run when inWindow and also near MythFillSuggestedRunTime?. A wide window (0-23) is a workaround. For the most part the suggested time feature is nullified, I guess leaving it up to DailyHouseKeeperTask? to run MythFillDB.

Attachments (2)

mfdb_failed_to_run.log (13.0 KB) - added by Frank Phillips <fphillips81@…> 6 years ago.
Backend started as scheduled to run MythFillDB, but did nothing, then shutdown.
after_patch.log (13.0 KB) - added by Frank Phillips <fphillips81@…> 6 years ago.
Backend correctly wakes and runs MythFillDB.

Download all attachments as: .zip

Change History (11)

Changed 6 years ago by Frank Phillips <fphillips81@…>

Attachment: mfdb_failed_to_run.log added

Backend started as scheduled to run MythFillDB, but did nothing, then shutdown.

Changed 6 years ago by Frank Phillips <fphillips81@…>

Attachment: after_patch.log added

Backend correctly wakes and runs MythFillDB.

comment:1 Changed 6 years ago by Frank Phillips <fphillips81@…>

comment:2 Changed 6 years ago by Raymond Wagner

Owner: changed from sphery to Raymond Wagner
Status: newaccepted

comment:3 Changed 6 years ago by Frank Phillips <fphillips81@…>

I know my writing is terse, sorry about that. I had hell with college papers. I'll elaborate:

The housekeeper misses potential suggested run times when you have a narrow window set (I have 2-5). The suggested time would have to fall into the window to be run, otherwise it is skipped because both conditions need to be true.

In my failed-to-run attachment, it woke for a suggested run time of 12:11, but failed the inWindow conditional and did not queue the task.

As alluded to above, someone with an infinite window set (0-23) would not experience this and the runs would happen at suggested times.

comment:4 Changed 6 years ago by sphery

Previously the housekeeper ignored the run window when you enabled the setting:

Run guide data program at time suggested by the grabber. If enabled, allow a DataDirect? guide data provider to specify the next download time in order to distribute load on their servers. Guide data program execution start/end times are also ignored.

(as described in the help text). Some on IRC claimed (in Oct '13) this is a bad idea (though it had been like that for 6 1/2 years before the discussion (which was triggered by the change in the new housekeeper).

So, either we ignore the run window (as before), or alternatively, we allow (and schedule for wakeup, when appropriate) mythfilldatabase runs during the next window after the grabber-suggested run time. Note, however, that running in the window after the suggested run time may result in skipping a day, which would mean users whose grabbers don't pull all data (including all Schedules Direct users who do not add the --dd-grab-all argument to their "Guide data arguments" setting) may not get some "tomorrow" updates from a standard tomorrow/+13 run (i.e. they get tomorrow on Monday, not Tuesday, then on Wednesday, so they lack updates for listings on Tuesday's tomorrow).

See #3302 and [ce20f46b] .

comment:5 Changed 6 years ago by Frank Phillips <fphillips81@…>

comment:6 Changed 6 years ago by Frank Phillips <frankalso@…>

Resolution: fixed
Status: acceptedclosed

In ff22b7199e6bf77105d2206a7945c2dd5b06b697/mythtv:

Housekeeper: let mythfilldatabase use suggested run times

UseSuggestedTime?() and InWindow?() should be mutually exclusive.

Fixes #12101

Signed-off-by: Jean-Yves Avenard <jyavenard@…>

comment:7 Changed 5 years ago by paulh

Milestone: unknown0.28

comment:8 Changed 4 years ago by Frank Phillips <frankalso@…>

In 5c34db0fa3da9bccf4cf16c696b34d12d08c5fa6/mythtv:

Housekeeper: let mythfilldatabase use suggested run times

UseSuggestedTime?() and InWindow?() should be mutually exclusive.

Fixes #12101

Signed-off-by: Jean-Yves Avenard <jyavenard@…>
(cherry picked from commit ff22b7199e6bf77105d2206a7945c2dd5b06b697)
Signed-off-by: Stuart Auchterlonie <stuarta@…>

comment:9 Changed 4 years ago by sphery

Milestone: 0.280.27.6
Note: See TracTickets for help on using tickets.