We have an application that needs to process incoming files that are dropped into a directory. I am looking for the best way to do this.
We have been using a looping Backgroundrb process, but, to be honest Backgroundrb is unreliable and we'd like to move away from it if possible.
Delayed_job doesn't seem to be for ongoing tasks but for one offs.
I've found DirectoryWatcher http://codeforpeople.rubyforge.org/directory_watcher/ which looks promising, but ideally we want to have some control over this and also be able to monitor if it is up or not.
So the requirements are:
Thanks for any input! This shouldn't be difficult and I am surprised I can't find someone else talking about this on the web as I would have thought that in business applications this was not uncommon.
And there's also guard:
Guard automates various tasks by running custom rules whenever file or directories are modified.
It's frequently used by software developers, web designers, writers and other specialists to avoid mundane, repetitive actions and commands such as "relaunching" tools after changing source files or configurations.
Common use cases include: an IDE replacement, web development tools, designing "smart" and "responsive" build systems/workflows, automating various project tasks and installing/monitoring various system services...