LinHES Forums http://forum.linhes.org/ |
|
Jobqueue internals question http://forum.linhes.org/viewtopic.php?f=17&t=17136 |
Page 1 of 1 |
Author: | grante [ Tue Oct 30, 2007 8:30 am ] |
Post subject: | Jobqueue internals question |
Since there don't seem to be any further ideas on how to get auto-transcoding to work http://www.mysettopbox.tv/phpBB2/viewtopic.php?t=17122 , I've started researching how to set up a user-job to queue a transcoding job. Yesterday I posted to the mythtv-users mailing list a couple questions on how the job-queue works. The S/N ratio in that list is pretty low, so it's no surprise that I didn't get an answer. Hopefully there's a KM user who knows. What's the "normal" initial state for the command and status fields? Should they be set to RUN and UNKNOWN, respectively? If I want to queue a job but don't want the job to run right away, what should I set the cmds and flags fields to when I create the job? My guesses are: Code: cmds flags
STOP UNKNOWN STOP ABORTED STOP CANCELLED And then when I later want to enable the job, do I set the cmds field to RUN or RESTART or ?. |
Author: | grante [ Thu Nov 01, 2007 8:47 am ] |
Post subject: | |
I did some experimenting with the job queue, and it appears the way to queue a job normally is with cmds=RUN and status=QUEUED (I should have been talking about status instead of flags in my previous posting). If you don't want the job to be run, queuing it with cmds=RUN and status=CANCELED seems to work. Later, when you want to enable the job, you change the status to QUEUED. So, the plan is to write a user-job that does the following: If a recording is HD, queue an immediate transcode job (status=QUEUED). If a recording is SD, queue a deferred (status=CANCELED) transcode job. Then I'll set up an hourly crontab entry that checks the job queue periodically and enables any transcode jobs that have been deferred for more than 48 hours. [Deferring transcoding for 48 hours avoids wasting energy transcoding shows that are viewed and deleted right away.] |
Page 1 of 1 | All times are UTC - 6 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |