Skip to content

Commit

Permalink
[#4722] Store cache lockfile in RAILS_ROOT/tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
edavis10 committed Nov 17, 2010
1 parent 920c8cd commit 211e0b6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/models/rate.rb
Expand Up @@ -145,7 +145,7 @@ def self.with_common_lockfile(force = false, &block)
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
Expand All @@ -154,4 +154,8 @@ def self.with_common_lockfile(force = false, &block)
public
generator_for :date_in_effect => Date.today
end

def self.lock_file
Rails.root + 'tmp' + Rate::CACHING_LOCK_FILE_NAME
end
end

0 comments on commit 211e0b6

Please sign in to comment.