Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- desc "Dump stash files"
- task :dump_stash do
- on roles (:db) do |host|
- if fetch(:stage).to_s == 'local'
- run_locally do
- execute "vagrant ssh -c 'mysql --user=#{fetch(:db_user)} --password=#{fetch(:db_pass)} #{fetch(:db_name)} -e 'TRUNCATE TABLE `exp_stash`;''"
- end
- else
- execute "mysql --user=#{fetch(:db_user)} --password=#{fetch(:db_pass)} #{fetch(:db_name)} -e 'TRUNCATE TABLE `exp_stash`;'"
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement