add handily task for service team

This commit is contained in:
Matt K. Fu 2013-07-02 17:36:48 +08:00
parent 69b3625861
commit 371485e420
1 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,14 @@
# encoding: utf-8
namespace :system_check do
task :god_can_start => :environment do
unless File.directory? "/var/log/rulingcom"
puts "Creating Rulingcom log folder"
`sudo mkdir -p /var/log/rulingcom`
end
end
task :set_resque_namespace,[:namespace] => :environment do |t,args|
site = Site.first
site.resque_namespace = args[:namespace]
site.save
end
end