[mythtv-users] User Job status reporting

Raymond Wagner raymond at wagnerrp.com
Sun Jan 19 01:50:17 UTC 2014


On 1/18/2014 7:02 PM, Yan Seiner wrote:
> I'm working with a transcoding script and I notice that the
> myth-supplied jobs have nice status while mine shows an exit status and
> a wrong "Errored".  The job finished fine and returned a code of '0'.
> I've looked at the sample user scripts provided in the wiki and I can't
> find any coding magic that would do that.....  How do I get my reporting
> to look like that of the native myth jobs?
>
> Mine -> Transcode (Errored: Sat Jan 18, 2014, 03:33 PM) exit status 0,
> job status was "Starting"
> Myth -> Flag Commercials (Finished: Sat Jan 18, 2014, 12:20 PM) 5
> commercial breaks
> Myth -> Look up Metadata (Finished: Sat Jan 18, 2014, 12:02 PM) Metadata
> Lookup Complete.

Manually insert that nice status message into the database.  Make sure 
you update your numerical status as well, or the jobqueue will overwrite 
the message when it updates the number.

If you read python, take a look at mythvidexport.py; particularly the 
following lines.



self.job.setComment("%02d%% complete - %d seconds remaining" %\
     (dstfp.tell()*100/srcsize, remt))

except Exception, e:
     Job(int(args[0])).update({'status':Job.ERRORED,
                              'comment':'ERROR: '+e.args[0]})


More information about the mythtv-users mailing list