Skip to content

Commit

Permalink
added two tasks, deploy:mono:backupdb and deploy:mono:clearcache
Browse files Browse the repository at this point in the history
  • Loading branch information
bfaloona committed Jun 30, 2010
1 parent 9ee3edc commit 3ab8630
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions config/deploy.rb
Expand Up @@ -24,6 +24,7 @@

# Passenger customized tasks
namespace :deploy do

desc "Restarting mod_rails (Passenger) with restart.txt"
task :restart, :roles => :app, :except => { :no_release => true } do
run "touch #{current_path}/tmp/restart.txt"
Expand All @@ -33,4 +34,20 @@
desc "#{t} task is a no-op with mod_rails (Passenger)"
task t, :roles => :app do ; end
end

namespace :mono do

desc "Clear Monologue file cache on server"
task :clearcache, :roles => :app, :except => { :no_release => true } do
run "rm -r #{current_path}/tmp/cache/views/"
end

desc "Backup the current Monologue db"
task :backupdb, :roles => :app, :except => { :no_release => true } do
date = Time.now.strftime("%Y_%m_%d")
run "cp #{current_path}/db/production.sqlite3 /home/freeinte/mono/db_backups/#{date}_production.sqlite3"
end

end

end

0 comments on commit 3ab8630

Please sign in to comment.