[#4722] Store cache lockfile in RAILS_ROOT/tmp

This commit is contained in:
Eric Davis
2010-11-17 09:07:27 -08:00
parent 920c8cdda5
commit 211e0b6bdf

View File

@@ -145,7 +145,7 @@ class Rate < ActiveRecord::Base
options = {:retries => 0, :suspend => 1}
options[:max_age] = 1 if force
Lockfile(CACHING_LOCK_FILE_NAME, options) do
Lockfile(lock_file, options) do
block.call
end
end
@@ -154,4 +154,8 @@ class Rate < ActiveRecord::Base
public
generator_for :date_in_effect => Date.today
end
def self.lock_file
Rails.root + 'tmp' + Rate::CACHING_LOCK_FILE_NAME
end
end