IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Got it, but define shortest?
If one place says that they want to sleep 15 seconds and another 20 seconds, if you do it wrong, you might wind up waiting close to 35 seconds for the 20 second people (because you're waking up every 15 seconds, you woke up and it is not yet time for the 20 second people, you slept and it is now way late).

I'd be tempted to solve this problem in a really cheesy way. For instance lose the "sleep/wake" logic entirely - just set a bunch of cron jobs that have a specified email address. And have an automated job that monitors that email address and will notify you in turn if errors happen too fast.

Your sweep utility becomes simpler. Your notification utility is also straightforward. And the "too many errors" logic now can apply for a variety of kinds of programs - not just this one kind of sweep. Besides it is now easy to tweak this so that one machine is monitoring sweeps that might be done on several different machines. And a final bonus - you don't have to write most of the code since the heavy lifting gets pushed to cron and email.

Cheers,
Ben
I have come to believe that idealism without discipline is a quick road to disaster, while discipline without idealism is pointless. -- Aaron Ward (my brother)
New Yick
I orginal thought about doing it that way, since my orginal was a single dir. The launch overhead, read database of historical files, scan dir, check current list, write database of new files, it is all a huge amount of unnecessary overhead.

Don't worry about the odd sleep calc when they don't mesh. I think in 15 second increments. Almost all dirs will be 1 minute, but a couple will be 15 seconds.

The code was easy, and the X errors in Y time was a breeze, aging off errors too old, etc.

New Sounds reasonable
I have come to believe that idealism without discipline is a quick road to disaster, while discipline without idealism is pointless. -- Aaron Ward (my brother)
     Hey Ben: Perl fork / return value question - (broomberg) - (10)
         Just follow the documentation... - (ben_tilly) - (9)
             Smack! (forehead) -NT - (broomberg)
             Doesn't seem to work - (broomberg) - (7)
                 I think you wanted $kid == $pid, not $kid == -1 - (ben_tilly) - (6)
                     Got it. - (broomberg) - (5)
                         D'oh, I missed the call to sleep in your loop - (ben_tilly) - (4)
                             No prob - (broomberg) - (3)
                                 Got it, but define shortest? - (ben_tilly) - (2)
                                     Yick - (broomberg) - (1)
                                         Sounds reasonable -NT - (ben_tilly)

Resistance is useless. You will assimilate us.
44 ms