Skip to content

Commit

Permalink
Make rake tasks depend on environment
Browse files Browse the repository at this point in the history
  • Loading branch information
tf committed Dec 21, 2017
1 parent 227057b commit dce43e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/cert_watch/tasks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module Tasks
extend Rake::DSL

namespace :cert_watch do
namespace :reinstall do
namespace reinstall: :environment do
desc 'Rewrite certificate files from database contents.'
task :all do
Certificate.installed.each(&:install)
Expand All @@ -14,7 +14,7 @@ module Tasks

namespace :import do
desc 'Read certbot outputs for all certificates and store in database.'
task :certbot do
task certbot: :environment do
Certificate.auto_renewable.installed.each do |certificate|
result = CertWatch.client.read_outputs(certificate.domain)
certificate.update!(result.slice(:public_key, :private_key, :chain))
Expand Down

0 comments on commit dce43e6

Please sign in to comment.