sql query for userjobs status

Post Reply
PaulR
Newcomer
Posts: 12
Joined: Fri Oct 19, 2018 12:53 am
United States of America

sql query for userjobs status

Post by PaulR » Fri Mar 06, 2020 4:19 pm

I have spent the better part of the week trying to figure out how recordings are linked to user jobs. Looking at the jobqueue table I see that the chanid is there to identify the channel of the recording but nothing identifying which recording. I also tried to find the command mythweb uses to display the job queue but for me that was a bust. My task is building a web front end for playback, I have everything done but I need to get the job queue status.

My questions are,

How are recordings linked to the job queue table?
What mysql command can I run to return the status of a job that has been queued?

Thank you for your time.

Paul

PaulR
Newcomer
Posts: 12
Joined: Fri Oct 19, 2018 12:53 am
United States of America

Re: sql query for userjobs status

Post by PaulR » Fri Mar 06, 2020 6:06 pm

after some more testing the following command works. I was helped by a search result that showed chanid and starttime were the link. hope this helps someone else in the future.

SELECT title, status FROM `recorded`,`jobqueue` WHERE recorded.chanid = jobqueue.chanid and recorded.starttime = jobqueue.starttime and recorded.basename = '10401_20200305220000.ts'

wmorrison
Senior
Posts: 122
Joined: Sat Dec 01, 2018 12:05 am
United States of America

Re: sql query for userjobs status

Post by wmorrison » Fri Mar 06, 2020 10:21 pm

PaulR wrote:
Fri Mar 06, 2020 6:06 pm
SELECT title, status FROM `recorded`,`jobqueue` WHERE recorded.chanid = jobqueue.chanid and recorded.starttime = jobqueue.starttime and recorded.basename = '10401_20200305220000.ts'
I'm not home so don't remember the exact column name, and am not sure if this is relevant to jobs, but...

The recorded table has another column, I think something like progstart, that may have a different time than starttime if the recording started early or late.

One is start time from listings data and the other is the actual time the recording started. I can't remember for sure which is which but I thing progstart is the starttime from program. Or even if it's in recorded or recordedprogram or wherever. I just remember I was querying for some information about recorded programs and one or two results were missing until I changed the query to use progstart (or whatever it's named.) I think I was joining recorded and recordedprogram and found "recorded.starttime = recordedprogram.starttime" skipped a few results.

I have never set anything up to start recording early or late, so I'm guessing there was a few seconds delay starting a recording. Maybe it had to free up a tuner or something.

Post Reply