[mythtv-users] restricting mythpreviewgen?
Alex Williamson
alex.l.williamson at gmail.com
Wed Jan 23 14:59:07 UTC 2013
On Tue, Jan 22, 2013 at 11:48 AM, Alex Williamson
<alex.l.williamson at gmail.com> wrote:
> On Tue, Jan 22, 2013 at 11:19 AM, Raymond Wagner <raymond at wagnerrp.com> wrote:
>> On 1/22/2013 12:38, Alex Williamson wrote:
>>> I can restrict other jobs to not run on this slave, can or can I not
>>> restrict mythpreviewgen?
>>
>>
>> Mythpreviewgen is not a job that runs through the jobqueue, and thus cannot
>> be restricted to a single host in the manner that the other tasks can. It is
>> always run by the backend that owns that recording. Assuming your slave
>> backend has no storage of its own, and records to shared storage on your
>> file server/master backend, your only real option is to have something run
>> after recording is finished to change ownership of that recording to the
>> master backend.
>
> Now we're getting somewhere, thank you. A mysql cron script wouldn't
> be too hard. Alternatively I was thinking about replacing
> /usr/bin/mythpreviewgen on the slave with a script that just does an
> rsh of the job to another system. Your idea might be less tedious to
> maintain though. Thanks,
This does seem to work, if I update the database like:
mysql> update recorded set hostname="<master>" where hostname="<slave>";
Then when I load mythweb I see mythpreviewgen running on the master.
Next step is to figure out when it's safe to do this. Can I do this
while the recording is still going? If so I could fork a job from the
hdpvr channel change script to sleep briefly then update the database.
Alternatively I could just create a user job to update the database,
with the downside being that previewgen during recording still runs on
the slave. But I could link mythpreviewgen to /bin/false on the slave
and just not get previews until after the job runs. Thanks,
Alex
More information about the mythtv-users
mailing list