Page 1 of 1

Concurrent access to files

PostPosted: Wed Jan 25, 2017 5:25 am
by nobsi
Hi,

I'm looking for a best practice on how to handle concurrent access to a file. Following scenario: A 3rd-party app pushes a file to Dropbox. Two Macs begin syncing the file and on both Hazel watches the folder. What I want to achieve is that only one (the first who grabs the file) processes the file.

I thought of something like a rename-waituntilsync-recheck routine.

Do you have any ideas or has someone already solved such a scenario?

Thank you and best regards,
Richard

Re: Concurrent access to files

PostPosted: Wed Jan 25, 2017 2:05 pm
by Mr_Noodle
I'd recommend against having Hazel on two machines processing the same set of files. It's best to have just one instance. Otherwise, you will have all sorts of issues with concurrency which will be very hard to handle.