From: Thiago Massa Date: 2011-06-16T10:11:35+09:00 Subject: Re: queues? inotify? anything else? --0016e6de049b1c761d04a5c9f36d Content-Type: text/plain; charset=ISO-8859-1 Hi!!! I know what is the problem, PROBABLY. I've used inotify with node to do the same, the reason why it isn't working it's because the "inotify script" is probably waiting to a certain event happen(like a file moved to the directory) and that isn't happening. When a file is moved to that directory, a chain of events is sent by inotify like "directory X is open, X file have been moved here, directory X is closed". I don't remember correctly, but there's events that: opens a file to read opens a file to write and so on... So that script is probably waiting for a event that NEVER happens. Instead of "moving" the file to the directory, try to create a new one, or PASTE the file and see if it works... Inotify is simple, if you have the script waste a little of your time checking what is going on and change the script into your needs. I hope my answer were helpful to you! 2011/6/15 Matt Harrison > I don't even really know how to describe this problem. I know what I want > the end result to be, but I've run into a dead end trying to figure out > possible solutions. > > I've got a script which looks for files of a given type in a directory, > processes them, then moves the result elsewhere and removes the sources. > > Currently, if I add another file to the directory while the script is > running, it will not be noticed (I'm using a simple directory read). > > I would like to be able to add file while the script is busy and have it > append the new filename to its list. I've considered inotify type monitoring > but I don't know much about it and if it could be made to fit this > single-threaded script. > > I've also thought about re-reading the directory after each file operation > is complete, and adding the previously unknown filenames to the list. > > I'm just not sure which way I should begin looking, if there's a good > solution for this already out there, or...what. > > Thanks for some input > > > -- Thiago Fernandes Massa 11 83979414 --0016e6de049b1c761d04a5c9f36d--