only clear cache for default shard

so that we don't accidentally clear it for each new shard

Change-Id: I93f760e72646ae0231a8d6659ea3b5370ecbac10
Reviewed-on: https://gerrit.instructure.com/38913
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
This commit is contained in:
Cody Cutrer 2014-08-07 21:18:45 -06:00
parent db517e5eb6
commit 4f4ffd1ea9
1 changed files with 1 additions and 1 deletions

View File

@ -2,7 +2,7 @@ class ClearRailsCache < ActiveRecord::Migration
tag :predeploy, :postdeploy tag :predeploy, :postdeploy
def up def up
Rails.cache.clear Rails.cache.clear if Shard.current.default?
end end
def down def down