Permalink
Browse files

No parens required -- just actually using the setting...

  • Loading branch information...
1 parent e9bce3f commit ffe829057ab3c5de86c2a28ff3497b0ac35af37e @watsonian committed Sep 4, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/mem_watcher.rb
View
@@ -8,7 +8,7 @@
class MemWatcher < Sinatra::Base
set :views, File.join(File.dirname(settings.root), "/views")
set :public_folder, File.join(File.dirname(settings.root), "/public")
- set :log_dir, (ENV['MEMWATCHER_LOG_DIR'] || File.join(File.dirname(settings.root), "/log/procs"))
+ set :log_dir, ENV['MEMWATCHER_LOG_DIR'] || File.join(File.dirname(settings.root), "/log/procs")
@@memory_threshold = (ENV['MEMWATCHER_MEMORY_THRESHOLD'] || 50000).to_i
@@max_memused = @@memory_threshold
@@ -86,7 +86,7 @@ def check_cleanup!
end
def get_log_list
- Dir.glob("log/procs/*.snapshot.out").sort.reverse
+ Dir.glob(File.join(settings.log_dir, "*.snapshot.out").sort.reverse
end
def cleanup_logs!

0 comments on commit ffe8290

Please sign in to comment.