Changeset 1488 for trunk/locker/deploy/bin
- Timestamp:
- Feb 23, 2010, 11:21:42 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/locker/deploy/bin/rails
- Property svn:mergeinfo changed
/branches/locker-dev/locker/deploy/bin/rails merged: 1469,1484-1486
r1427 r1488 130 130 131 131 t2 = Thread.new do 132 # List of directories to watch for changes before reload 133 Thread.current[:watched_dirs] = ['app', 'config', 'db', 'lib', 'public'] 132 # List of directories to watch for changes before reload. 133 # You may want to also watch public or vendor, depending on your needs. 134 Thread.current[:watched_dirs] = ['app', 'config', 'db', 'lib'] 135 136 # List of specific files to watch for changes. 137 Thread.current[:watched_files] = ['public/dispatch.fcgi', 138 'public/.htaccess'] 134 139 # Sample filter: /(\.rb|\.erb)\$/. Default filter: watch all files 135 140 Thread.current[:watched_extensions] = // … … 169 174 Thread.current[:modifications] = {} 170 175 Thread.current[:iterations] = 0 171 RailsFCGIHandler.reload! 176 # This is a kludge, but at the same time it works. 177 # Will kill the current FCGI process so that it is reloaded 178 # at next request. 179 raise RuntimeError 172 180 end 173 181 … … 175 183 # Wait until the modify time changes, then reload. 176 184 while true 177 reload if Thread.current[:watched_dirs].inject(false) {|z, dir| z || modified_dir(File.join(File.dirname(__FILE__), '..', dir))} 185 dir_modified = Thread.current[:watched_dirs].inject(false) {|z, dir| z || modified_dir(File.join(File.dirname(__FILE__), '..', dir))} 186 file_modified = Thread.current[:watched_files].inject(false) {|z, file| z || modified(File.join(File.dirname(__FILE__), '..', file))} 187 reload if dir_modified || file_modified 178 188 Thread.current[:iterations] += 1 179 189 sleep 1 - Property svn:mergeinfo changed
Note: See TracChangeset
for help on using the changeset viewer.