summaryrefslogtreecommitdiff
path: root/lib/tasks/heater.rake
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-16 21:02:18 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-16 21:02:18 +0100
commita74efe4bb1b5afeaf892d18ba2e7969ed17b4099 (patch)
tree908a588600022f5bfeabd9b9edcfed2eed01a45b /lib/tasks/heater.rake
parent0d5fd7ba5092b4d00826f3572448bb54ac2ec983 (diff)
parent7cdcbdc4b851b348bb21e0f2ff437138e8b9884b (diff)
Merge branch 'page_caching' into develop
Diffstat (limited to 'lib/tasks/heater.rake')
-rw-r--r--lib/tasks/heater.rake11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/tasks/heater.rake b/lib/tasks/heater.rake
index 7d026d9..11862a5 100644
--- a/lib/tasks/heater.rake
+++ b/lib/tasks/heater.rake
@@ -1,6 +1,17 @@
namespace :heater do
desc "Warm up the cache."
task :preheat => :environment do
+ if GemeinschaftSetup.any?
+ else
+ # This is a fresh installation.
+ #
+ if Rails.env.production?
+ require 'open-uri'
+ open('/dev/null', 'wb') do |file|
+ file << open("http://localhost/gemeinschaft_setups/new").read
+ end
+ end
+ end
end
end \ No newline at end of file