More efficient checking for empty subfolders?

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

More efficient checking for empty subfolders? Sun Jun 17, 2012 8:01 pm • by nriley
Hi,

I created a rule which works, but it seems Hazel has to check it very frequently.

Image

Inside the Library/Scans Completed folder, there are a few folders. I want the rule to trigger when all of these folders have remained empty for several minutes.

The log shows that Hazel ends up checking the folder every few seconds, and it's affected by other subfolders than "Scans Completed".

2012-06-17 19:39:44.542 hazelworker[9255] Sending metrics to scheduler. Next scheduled run: 5828963-12-19 19:00:00.000
2012-06-17 19:39:44.782 hazelworker[9256] File Preferences is busy. Skipping for now.
2012-06-17 19:39:46.810 hazelworker[9256] File Preferences is busy. Skipping for now.
2012-06-17 19:39:48.837 hazelworker[9256] Sending metrics to scheduler. Next scheduled run: 2012-06-17 19:44:43.000
2012-06-17 19:39:48.888 hazelworker[9263] Processing folder Library
2012-06-17 19:39:50.914 hazelworker[9263] Sending metrics to scheduler. Next scheduled run: 2012-06-17 19:44:43.000
2012-06-17 19:39:50.963 hazelworker[9264] Processing folder Library

Short of moving my folder to somewhere else other than the Library folder (I've already had to nest it more deeply than originally desired) is there another way I can stop Hazel from checking so frequently?

Thanks!
nriley
 
Posts: 19
Joined: Mon Sep 12, 2011 1:19 pm

I believe the reason it's busy is because there are file events constantly happening under the folder you are checking. For a rule like this, it has to work this way as otherwise, how would Hazel know that the the folders are all of a sudden empty? Any change in the filesystem below that point has to be checked to see if it changed things to make this condition true or false.
Mr_Noodle
Site Admin
 
Posts: 11865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

I understand what you're saying, but the basic issue is that Hazel is triggering on changes in folder A when all I'm interested in is folder A/B. I couldn't figure out a way to write this rule (if it was possible) such that Hazel ignores the rest of folder A.

That said, the scanning doesn't seem to overwhelm the Mac, it just generates a lot of log output.
nriley
 
Posts: 19
Joined: Mon Sep 12, 2011 1:19 pm

nriley wrote:I understand what you're saying, but the basic issue is that Hazel is triggering on changes in folder A when all I'm interested in is folder A/B. I couldn't figure out a way to write this rule (if it was possible) such that Hazel ignores the rest of folder A.

That said, the scanning doesn't seem to overwhelm the Mac, it just generates a lot of log output.


You're monitoring the ~/Library/ directory, so your rule is going to be triggered dozens of times a minute, if not more often. I'd suggest moving the Scans Completed out of the Library.
a_freyer
 
Posts: 631
Joined: Tue Sep 30, 2008 9:21 am
Location: Colorado


Return to Support