Incomplete application of rule to copy files

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

Moderator: Mr_Noodle

Incomplete application of rule to copy files Sat Sep 06, 2014 1:20 pm • by howardm
Hi,

I have an iMac in my office at work. I have a rule to copy files added to an application's database to a synced Dropbox folder.

The files in the database are sent there from a Radiology PACS (Picture Archiving and Communication System). Depending on internal network conditions, all the files may take several minutes to arrive in the Database.

I've noticed that Hazel starts to process the database folder, but the ultimate copying of the files is substantially incomplete.

This is the relevant Log (with my comments):

“2014-09-06 10:35:02.939 hazelworker[6420] Processing folder DATABASE.noindex
2014-09-06 10:35:04.784 hazelworker[6418] Done processing folder Trash
2014-09-06 10:35:05.038 hazelworker[6420] File 20000 is busy. Skipping for now.
2014-09-06 10:35:07.541 hazelworker[6420] Done processing folder DATABASE.noindex
2014-09-06 10:35:08.541 hazelworker[6426] ###main load address: 0x10990e000
2014-09-06 10:35:08.542 hazelworker[6426] ###Noodle load address: 0x1099e9000
2014-09-06 10:35:08.542 hazelworker[6426] ###CK load address: 0x1099ac000
2014-09-06 10:35:08.951 hazelworker[6426] Processing folder DATABASE.noindex
2014-09-06 10:35:11.046 hazelworker[6426] File 20000 is busy. Skipping for now.
2014-09-06 10:35:13.349 hazelworker[6426] Done processing folder DATABASE.noindex”

My comment: Only 70 of 931 files were processed and included in folder 2000 created in the Dropbox folder.

……………

Now, the result of manual “Run Rule” done a bit later:

“2014-09-06 10:44:18.759 hazelworker[6571] Processing folder DATABASE.noindex (forced)
2014-09-06 10:44:20.861 hazelworker[6571] 20000: Rule SendToLaptopOsiriX matched.
2014-09-06 10:44:37.382 hazelworker[6571] [File Event] File copied: 20000-1 copied from folder /Users/[me]/Documents/OsiriX Data/DATABASE.noindex to folder /Users/[me]Dropbox/iMacDICOMS.
2014-09-06 10:44:37.386 hazelworker[6571] Done processing folder DATABASE.noindex”

My comment: Another folder labeled 2000-1 was created in Dropbox, and all (the rest) of the files copied over properly.

...........

So, Hazel seems to understand that the transfer of files is occurring and skips a bit, but ultimately processes the database folder "prematurely." It doesn't check the folder again so the copying of files is incomplete.

Is there anything I can do about this ?

Thanks.


Howard
howardm
 
Posts: 16
Joined: Fri Sep 05, 2014 4:51 pm

Hi,

I think I've resolved this issue by adding the following condition at the top:

Date Added is not in the last 5 minutes.


That seems to prevent Hazel from "premature" incomplete copying.


Howard
howardm
 
Posts: 16
Joined: Fri Sep 05, 2014 4:51 pm

I am having the same problem, with Hazel either:

i) copying files from folder B to folder C before the files are completely transferred from folder A to folder B, or
ii) the file copying (from folder B to C) stops before it is complete

For example, I just had a 2GB video file download to the downloads folder perfectly fine. Then, it is supposed to transfer to another folder for file matching and renaming. Then it is supposed to transfer to an external hard drive. The final file on the external hard drive was 58MB. The same thing happens for every file that I have rules for copying or transferring from one folder to another via Hazel.

This all worked perfectly fine for the past 2 years. Now, all of a sudden, all the files in the end folders are far too small and incomplete.

I tried modifying relevant rules to not transfer or copy files until after 5 minutes or even 1 hour, but the same thing still happens. Which makes me think it's more likely that Hazel is aborting file transfers before they are finished, rather than transferring files from folder B to C before the file is complete transferred from folder A to B.

Anyone else having this issue? Any ideas?
rojonixon
 
Posts: 5
Joined: Mon Jan 07, 2013 3:33 pm

What program are you using to download the folder? Again, whether Hazel can detect whether something is in the midst of being downloaded/copied depends soley on the program doing the downloading/copying. Many use the proper locks which Hazel can detect but many don't and provide no way for Hazel to know that.

That said, if it still happens after an hour, you need to look into it more carefully. For one, make sure you monitor the download and see if it actually completes in that time. Check the logs as that will also provide info on what is going on.
Mr_Noodle
Site Admin
 
Posts: 11866
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Thanks for the response. uTorrent downloads the file to the download folder. Once done, uTorrent (not Hazel) transfers the completed download to a different "CompleteDownloads" folder. From then on, it's all Hazel moving files to other folders.

Watching a few files go through the process, there is no problem with the downloading or transferring to the "CompleteDownloads" folder. It seems to be the final transfer, from the local hard drive "Movies" folder to the external hard drive folder that is incomplete. I will try looking into the logs and following a few more files to see if I can get more info.

Thanks

Rob
rojonixon
 
Posts: 5
Joined: Mon Jan 07, 2013 3:33 pm

If the torrent and completed folders are on different drives, then there's an issue there. That type of operation requires copying the file across the drives and has a window of time where the file can be caught in transit. I'm guessing uTorrent doesn't lock the file. If Hazel is going to move the file out of the completed folder anyways, you might want to just put the completed folder on the same drive as the one for pending downloads.
Mr_Noodle
Site Admin
 
Posts: 11866
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support