wimleers / fileconveyor

File Conveyor is a daemon written in Python to detect, process and sync files. In particular, it's designed to sync files to CDNs. Amazon S3 and Rackspace Cloud Files, as well as any Origin Pull or (S)FTP Push CDN, are supported. Originally written for my bachelor thesis at Hasselt University in Belgium.
https://wimleers.com/fileconveyor
The Unlicense
341 stars 95 forks source link

#94 - Better error handling for inotify file scanning #144

Open jstarcher opened 11 years ago

jstarcher commented 11 years ago

I've been having this issue like crazy and it crashes fileconveyor on Ubuntu 10.04 with Python 2.6.5. I tested fringedgentian's suggestion and can confirm this has fixed the issues.

wimleers commented 11 years ago

Awesome — thank you!

I will review this PR this weekend :)

jstarcher commented 11 years ago

Great, sounds good. I just made one more commit (ce0762e) to update the error logging.

wimleers commented 11 years ago

All looks great!

The only change I'd like to see: from

probably a file does not exist at '%s'.

to

the file '%s' probably no longer exists. Ignoring this file system event.

What would be even better is if you would test for e.errno == 2, which means the file indeed no longer exists. Then you can explicitly log (not warn) "no longer exists" instead of "probably no longer exists", and then have a separate message that warns (not logs) for all other cases.