[#4722] Store cache lockfile in RAILS_ROOT/tmp
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user