Re: How to rate limit processes started by incron?

From: Christoph Sievers <christoph.sievers_at_gmail.com>
Date: Tue, 11 May 2010 21:20:53 +0200

which script do you mean? Am I going to miss events that way?

On Tue, May 11, 2010 at 8:37 PM, Matthew Miller <mattdm_at_mattdm.org> wrote:
> On Tue, May 11, 2010 at 08:21:07PM +0200, Christoph Sievers wrote:
>> Problem:
>> Unfortunately someone copies 30 thousand files to /home/sync which
>> results in a lot of processes and a lot of things go wrong then. How
>> do I can I solve this?
>
> Use IN_NO_LOOP. This will fire one process and not do it again until that
> one exits. Have your script loop until there's nothing more to do.
>
> There's a minor race condition -- a file could be written after the process
> last checks and the next one is fired. If events happen frequently enough,
> that should't be a problem in practical use. (The next run will get it.)
> --
> Matthew Miller           blocked-address          <http://mattdm.org/>
>
>

-- 
CSI
Received on Tue Jun 05 2012 - 22:14:21 CEST

This archive was generated by hypermail 2.2.0 : Tue Jun 05 2012 - 22:14:21 CEST