Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replaced :environment with :remote_environment #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/mina/whenever/tasks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@

namespace :whenever do
desc 'Clear crontab'
task clear: :environment do
task clear: :remote_environment do
comment "Clear contrab for #{fetch(:whenever_name)}"
in_path fetch(:current_path) do
command "#{fetch(:bundle_bin)} exec whenever --clear-crontab #{fetch(:whenever_name)} --set 'environment=#{fetch(:rails_env)}&path=#{fetch(:current_path)}'"
end
end

desc 'Update crontab'
task update: :environment do
task update: :remote_environment do
comment "Update crontab for #{fetch(:whenever_name)}"
in_path fetch(:current_path) do
command "#{fetch(:bundle_bin)} exec whenever --update-crontab #{fetch(:whenever_name)} --set 'environment=#{fetch(:rails_env)}&path=#{fetch(:current_path)}'"
end
end

desc 'Write crontab'
task write: :environment do
task write: :remote_environment do
comment "Write crontab for #{fetch(:whenever_name)}"
in_path fetch(:current_path) do
command "#{fetch(:bundle_bin)} exec whenever --write-crontab #{fetch(:whenever_name)} --set 'environment=#{fetch(:rails_env)}&path=#{fetch(:current_path)}'"
Expand Down