From 3ab86302162d0ae134b3c77af323367f7a23f02d Mon Sep 17 00:00:00 2001 From: Brandon Faloona Date: Wed, 30 Jun 2010 08:26:49 -0700 Subject: [PATCH] added two tasks, deploy:mono:backupdb and deploy:mono:clearcache --- config/deploy.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/config/deploy.rb b/config/deploy.rb index 8f52042..ee4e5ff 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -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" @@ -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 \ No newline at end of file