Just noticed this - yes I think I can add this to LazySearch.

Wirrunna, could you drop me a PM with an email address and I'll get a
version to you that you could test for me before I push that out in an
official update.

Gordon, thanks for the CLI code examples.

Stuart


On Fri, 2009-03-13 at 14:40 -0700, gharris999 wrote:
> Wirrunna;406033 Wrote: 
> > Stuart,
> > I have both Lazy Search and Server Power Control installed and suspect
> > that Server Power Control shuts down my server before the lazification
> > process has finished if I kick off a "clear and rescan everything"
> > before going to bed at night.
> > The Server Power Control plugin monitors the server activity and shuts
> > it down after a configurable period of idleness.
> > Now, I could lengthen the idle period, but I suggest that the better
> > way will be for the lazification process to tell Server Power Control
> > that its still lazifying the database.
> > I'll post in the Server Power Control thread and hopefully you and
> > Gordon can sort this out.
> Cross posting for Stuart's benefit:
> 
> Any plugin can set and clear SrvrPowerCtrl blocks via the CLI without
> having to worry about whether SrvrPowerCtrl is installed or not.  If
> SrvrPowerCtrl isn't there, the cli call is harmless and does nothing.
> 
> E.G.
> 
> Code:
> --------------------
>     
>   #Prevent untimely suspends, etc.. 
>   my $blockOwner = 'LazySearch';
>   my $blockReason = 'Performing_Lazifacation';
>   my $blockcode = $client->execute(['srvrpowerctrl', 'setblock', 
> $blockReason, $blockOwner]);
>   
>   #my long running process...
>   #...
>   #...
>   
>   #Unblock suspends, etc...
>   $client->execute(['srvrpowerctrl', 'clearblock', $blockcode, $blockOwner]);
>   
> --------------------
> 
> 
> -- alternately, a stateless implementation:
> 
> 
> Code:
> --------------------
>     
>   #Prevent untimely suspends, etc.. 
>   $client->execute(['srvrpowerctrl', 'setblock', 'reason_for_blocking', 
> 'viacli']);
>   
>   #my long running process...
>   #...
>   #...
>   
>   #Unblock suspends, etc...
>   $client->execute(['srvrpowerctrl', 'clearblock', 'reason_for_unblocking', 
> 'viacli']);
>   
> --------------------
> 
> 
> Wrapping a long-ish process in those set block & clear block cli
> requests will prevent SrvrPowerCtrl from interrupting a process by
> shutting down / suspending / etc.  The calls have the added benefit
> that, if SrvrPowerCtrl IS installed, the
> "reason_for_blocking/unblocking" messages get displayed briefly on all
> clients.
> 
> 

_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to