Skip to content

Commit

Permalink
Fixed posing to dojrzewtr
Browse files Browse the repository at this point in the history
  • Loading branch information
marcingrzejszczak committed Jun 15, 2015
1 parent c32ec5c commit 2ad1077
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public DojrzewatrUpdater(ServiceRestClient serviceRestClient, RetryExecutor retr

Ingredients updateIfLimitReached(Ingredients ingredients) {
if (ingredientsMatchTheThreshold(ingredients)) {
notifyDojrzewatr();
notifyDojrzewatr(ingredients);
updateDatabaseStatus();
}
return ingredientWarehouse.getCurrentState();
Expand All @@ -39,13 +39,13 @@ private boolean ingredientsMatchTheThreshold(Ingredients ingredients) {
return allIngredientsPresent && allIngredientsOverThreshold;
}

private void notifyDojrzewatr() {
private void notifyDojrzewatr(Ingredients ingredients) {
serviceRestClient.forService("dojrzewatr")
.retryUsing(retryExecutor)
.post()
.withCircuitBreaker(withGroupKey(asKey("dojrzewatr_notification")))
.onUrl("/brew")
.withoutBody()
.body(ingredients)
.withHeaders().contentType(Version.DOJRZEWATR_V1)
.andExecuteFor()
.ignoringResponseAsync();
Expand Down

0 comments on commit 2ad1077

Please sign in to comment.