Skip to content

Commit

Permalink
Update class name to make clear it is a client of the Posts service.
Browse files Browse the repository at this point in the history
  • Loading branch information
cdavisafc committed Feb 18, 2019
1 parent 755079b commit 47f3fbb
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 17 deletions.
15 changes: 3 additions & 12 deletions cloudnative-requestresilience/buildAndPushDockerImages.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
docker build --build-arg \
jar_file=cloudnative-connectionposts/target/cloudnative-connectionposts-0.0.1-SNAPSHOT.jar \
-t cdavisafc/cloudnative-requestresilience-connectionposts:0.0.1 .
-t cdavisafc/cloudnative-requestresilience-connectionposts:0.0.2 .
# only connections posts has changed for this step
#
docker build --build-arg \
jar_file=cloudnative-connections/target/cloudnative-connections-0.0.1-SNAPSHOT.jar \
-t cdavisafc/cloudnative-requestresilience-connections:0.0.1 .
#
docker build --build-arg \
jar_file=cloudnative-posts/target/cloudnative-posts-0.0.1-SNAPSHOT.jar \
-t cdavisafc/cloudnative-requestresilience-posts:0.0.1 .
#
docker push cdavisafc/cloudnative-requestresilience-connectionposts:0.0.1
docker push cdavisafc/cloudnative-requestresilience-connections:0.0.1
docker push cdavisafc/cloudnative-requestresilience-posts:0.0.1
docker push cdavisafc/cloudnative-requestresilience-connectionposts:0.0.2
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public ConnectionsPostsController(StringRedisTemplate template) {
RestTemplateBuilder restTemplateBuilder;

@Autowired
PostsService postsService;
PostsServiceClient postsServiceClient;

@Override
public void afterPropertiesSet() {
Expand Down Expand Up @@ -148,7 +148,7 @@ public Iterable<PostSummary> getByUsername(@CookieValue(value = "userToken", req
// try getting the Posts for these users

try {
postSummaries = postsService.getPosts(ids, restTemplate);
postSummaries = postsServiceClient.getPosts(ids, restTemplate);
response.setStatus(200);
return postSummaries;
} catch (HttpServerErrorException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import java.util.ArrayList;

@Service
public class PostsService {
public class PostsServiceClient {

private static final Logger logger = LoggerFactory.getLogger(ConnectionsPostsController.class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spec:
spec:
containers:
- name: connections
image: cdavisafc/cloudnative-requestresilience-connections
image: cdavisafc/cloudnative-requestresilience-connections:0.0.1
livenessProbe:
httpGet:
path: /healthz
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spec:
spec:
containers:
- name: connectionsposts
image: cdavisafc/cloudnative-requestresilience-connectionposts:0.0.1
image: cdavisafc/cloudnative-requestresilience-connectionposts:0.0.2
# resources:
# limits:
# memory: "2048Mi"
Expand Down

0 comments on commit 47f3fbb

Please sign in to comment.