How to monitor specific folder and save content of each file in this folder to mysql database

view story

http://stackoverflow.com – We are developing service for our qa staff. The main goal is that tester from web interface selects github branch, dump for this particular machine and clicks "Delpoy" button, and rails app for testing is deployed to Digital Ocean. The feature I am now working on, is collecting deployment logs and display them through our web interface. On DO droplet there is a "logs" folder which contains different log files which are populated during deployment: migrations_result_#{machine_id}.log, bundle_result_#{machine_id}.log, etc. Where #{machine_id} - id of deployed machine on our service(it i (HowTos)