[mythtv-users] user jobs vs the built-in kind

George Nassas gnassas at mac.com
Sun Nov 23 02:48:41 UTC 2014


On Nov 22, 2014, at 11:58 AM, George Nassas <gnassas at mac.com> wrote:

I thought it would be faster to ask the list but I guess not, I’ll answer my own questions for future archive readers who may travel the same path.

> I have a long-running user job and have noticed that the frontend doesn’t give any indication that a recording has an active job. With commflagging and transcoding I get the little spinning marker next to its name (I’m using Blue Abstract for the theme) but for user jobs I have to go the the system status -> jobs menu.

The job manager does indeed mark a recording as having an active job in JobQueue::ProcessJob but the relevant consumer of that information, playbackbox’s extract_job_state, doesn’t pass user job information to themes.

> Also problematic is how the backend doesn’t seem to check for running user jobs when deciding if it’s safe to shut down. They do get restarted the next time the machine comes up but it would be good to have them run all the way through the first time.

Scheduler::HandleIdleShutdown is the point man here and it pays no attention to jobs regardless of pedigree. From previous looks I thought commflags would block shutdown but it doesn’t seem like it or the test is well hidden.

> Is this behaviour intentional or an oversight? And, would a patch to change it be committed?

I would be happy to supply patches for both changes. I can understand if there’s concern over messing with the idle loop and anyway one can accomplish the same with the shutdown pretest script.

Extending extract_job_state for user jobs seems harmless and worthwhile.

> For extra bonus points: every so often I read the four job limit is going to be lifted from myth, what’s the status of that? It would make an awfully nice Christmas present ;)


Still interested in this plus also, is there a good way to refresh a database record’s information? I would like my long-running job to recognize if it has been paused or aborted and without refreshing my script’s job object I think the only way is to create endless new job objects in my polling loop.

- George


More information about the mythtv-users mailing list