Skip to content

Commit

Permalink
Merge pull request #234 from platanus/sidekiq-check-heroku
Browse files Browse the repository at this point in the history
fix(background_processor): add check for installed heroku recipe
  • Loading branch information
gmq authored Nov 11, 2019
2 parents 0012fb7 + c79cffc commit 2e75ff5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/potassium/recipes/background_processor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ def add_sidekiq
end

def edit_procfile(cmd)
gsub_file("Procfile", /^.*$/m) { |match| "#{match}worker: #{cmd}" } if selected?(:heroku)
heroku = load_recipe(:heroku)
if selected?(:heroku) || heroku.installed?
gsub_file('Procfile', /^.*$/m) { |match| "#{match}worker: #{cmd}" }
end
end

def add_adapters(name)
Expand Down

0 comments on commit 2e75ff5

Please sign in to comment.