[mythtv] [PATCH] Stop automatic shutdown when jobs still pending (or user jobs running)

Matt Doran matt.doran at papercut.biz
Thu Apr 26 01:03:22 UTC 2007


Thanks Chris,

I'll create a revised patch soon.


Chris Pinkham wrote:
> Sorry for not responding to the other thread quickly.  I'm glad you went
> ahead with this.
>   
> Glancing over this, I think that this looks good so far.  I think I would
> like to keep the debug statements in that print out the window start/end
> times.  They will only ever be executed when we run with "-v jobqueue",
> and the settings values are cached, so I think it's OK to change them
> to something like the following instead of removing the start/end times
> from the debug statements:
>
>     if (print_verbose_messages & VB_JOBQUEUE) {
>         queueStartTimeStr =
>             gContext->GetSetting("JobQueueWindowStart", "00:00");
>         queueEndTimeStr =
>             gContext->GetSetting("JobQueueWindowEnd", "23:59");
>
>         VERBOSE(VB_JOBQUEUE, LOC +
>                 QString("Currently set at %1 job(s) max and to run new jobs "
>                         "from %2 to %3").arg(maxJobs).arg(queueStartTimeStr)
>                                         .arg(queueEndTimeStr));
>     }
>
> That way when running in debug mode we can still see the window times
> even though you've moved out the actual logic into JobQueue::InJobRunWindow().
>   
Re the logging of times, they will be still output at -v jobqueue, 
because I output the times in the new InJobRunWindow() method.

+    VERBOSE(VB_JOBQUEUE, LOC +
+            QString("Currently set to run new jobs from %1 to %2")
+                    .arg(queueStartTimeStr).arg(queueEndTimeStr));


But I can also, output them in the main job loop too if you like.

Thanks,
Matt



More information about the mythtv-dev mailing list