[mythtv-users] Presenting % complete for user job

Chris Pinkham cpinkham at bc2va.org
Tue Sep 25 14:43:06 UTC 2007

* On Tue Sep 25, 2007 at 04:37:04PM +1000, Peter Schachte wrote:
> I'm writing a script to be used as a user job and would like myth and mythweb to
> be able to report percentage complete in their respective status screens, as they
> do for transcoding and commflagging.  Is that possible?  The User Jobs wiki page
> (http://www.mythtv.org/wiki/index.php/User_Jobs) doesn't mention it, and google
> was no help.  I'm happy to poke the database when the percentage changes, or
> reformat my stdout or stderror into whatever format myth might recognize.

You need to update the jobqueue.comment field in the database.  If you give your
User Job the %JOBID% argument, then you'll know what jobqueue.id row to update in
the table.  It's up to your job to update this field, the JobQueue has no idea
what your script does so it can't estimate percent complete.  If you are doing
some coding to support this, consider extending the perl bindings to add this
functionality.  There is a JobQueue::ChangeJobComment in the C++ code, so please
use this same naming convention if you make a perl method for this.


More information about the mythtv-users mailing list