Skip to content

Commit

Permalink
Load environment for whenever tasks fixes mina-deploy#267
Browse files Browse the repository at this point in the history
  • Loading branch information
vad4msiu committed Jan 30, 2015
1 parent 9b97f8e commit 10fce3f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/mina/whenever.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@

namespace :whenever do
desc "Clear crontab"
task :clear do
task :clear => :environment do
queue %{
echo "-----> Clear crontab for #{domain}_#{rails_env}"
#{echo_cmd %[cd #{deploy_to!}/#{current_path!} ; #{bundle_bin} exec whenever --clear-crontab #{domain}_#{rails_env} --set 'environment=#{rails_env}&path=#{deploy_to!}/#{current_path!}']}
}
end
desc "Update crontab"
task :update do
task :update => :environment do
queue %{
echo "-----> Update crontab for #{domain}_#{rails_env}"
#{echo_cmd %[cd #{deploy_to!}/#{current_path!} ; #{bundle_bin} exec whenever --update-crontab #{domain}_#{rails_env} --set 'environment=#{rails_env}&path=#{deploy_to!}/#{current_path!}']}
}
end
desc "Write crontab"
task :write do
task :write => :environment do
queue %{
echo "-----> Update crontab for #{domain}_#{rails_env}"
#{echo_cmd %[cd #{deploy_to!}/#{current_path!} ; #{bundle_bin} exec whenever --write-crontab #{domain}_#{rails_env} --set 'environment=#{rails_env}&path=#{deploy_to!}/#{current_path!}']}
Expand Down

0 comments on commit 10fce3f

Please sign in to comment.