forked from sqshq/piggymetrics
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add fallback on update statistic for account service
- Loading branch information
Showing
5 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
...ervice/src/main/java/com/piggymetrics/account/client/StatisticsServiceClientFallback.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.piggymetrics.account.client; | ||
|
||
import com.piggymetrics.account.domain.Account; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
import org.springframework.stereotype.Component; | ||
|
||
/** | ||
* @author cdov | ||
*/ | ||
@Component | ||
public class StatisticsServiceClientFallback implements StatisticsServiceClient { | ||
private static final Logger LOGGER = LoggerFactory.getLogger(StatisticsServiceClientFallback.class); | ||
@Override | ||
public void updateStatistics(String accountName, Account account) { | ||
LOGGER.error("Error during update statistics for account: {}", accountName); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,3 +20,7 @@ server: | |
servlet: | ||
context-path: /accounts | ||
port: 6000 | ||
|
||
feign: | ||
hystrix: | ||
enabled: true |