Skip to content

Commit

Permalink
Merge pull request #262 from platanus/fix-repeated-sidekiq
Browse files Browse the repository at this point in the history
fix(mailer): avoid sidekiq repeated installation
  • Loading branch information
rjherrera authored Feb 3, 2020
2 parents df23f70 + 6b7f3c1 commit 9ae0ae0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Features:
Fix:
- Correctly use cache for bundle dependencies in CircleCI build [#244](https://github.com/platanus/potassium/pull/244) and [#258](https://github.com/platanus/potassium/pull/258)
- Fix model auto annotate [#260](https://github.com/platanus/potassium/pull/260)
- Fix sidekiq repeated installation on potassium create if selecting mailer [#262](https://github.com/platanus/potassium/pull/262)

## 5.2.3

Expand Down
7 changes: 5 additions & 2 deletions lib/potassium/recipes/mailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@ def create
dependencies(email_service)
config(email_service)

background_processor = load_recipe(:background_processor)
background_processor.add_sidekiq unless background_processor.installed?
background_processor_recipe = load_recipe(:background_processor)
background_processor_answer = get(:background_processor)

background_processor_recipe.add_sidekiq unless background_processor_recipe.installed? ||
background_processor_answer
end

def install
Expand Down

0 comments on commit 9ae0ae0

Please sign in to comment.