Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1003 from Netflix/feature/cleanup_batch_service
Browse files Browse the repository at this point in the history
remove duplicated code
  • Loading branch information
Alex committed Feb 21, 2019
2 parents 0c13e09 + 5cd69f1 commit 1510638
Showing 1 changed file with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@ public WorkflowBulkServiceImpl(WorkflowExecutor workflowExecutor) {
@Service
public BulkResponse pauseWorkflow(List<String> workflowIds){

for (String workflowId : workflowIds) {
workflowExecutor.pauseWorkflow(workflowId);
}

BulkResponse bulkResponse = new BulkResponse();
for (String workflowId : workflowIds) {
try {
Expand All @@ -74,7 +70,6 @@ public BulkResponse pauseWorkflow(List<String> workflowIds){
public BulkResponse resumeWorkflow(List<String> workflowIds) {
BulkResponse bulkResponse = new BulkResponse();
for (String workflowId : workflowIds) {
workflowExecutor.resumeWorkflow(workflowId);
try {
workflowExecutor.resumeWorkflow(workflowId);
bulkResponse.appendSuccessResponse(workflowId);
Expand All @@ -97,7 +92,6 @@ public BulkResponse resumeWorkflow(List<String> workflowIds) {
public BulkResponse restart(List<String> workflowIds, boolean useLatestDefinitions) {
BulkResponse bulkResponse = new BulkResponse();
for (String workflowId : workflowIds) {
workflowExecutor.rewind(workflowId, useLatestDefinitions);
try {
workflowExecutor.rewind(workflowId, useLatestDefinitions);
bulkResponse.appendSuccessResponse(workflowId);
Expand All @@ -118,7 +112,6 @@ public BulkResponse restart(List<String> workflowIds, boolean useLatestDefinitio
public BulkResponse retry(List<String> workflowIds) {
BulkResponse bulkResponse = new BulkResponse();
for (String workflowId : workflowIds) {
workflowExecutor.retry(workflowId);
try {
workflowExecutor.retry(workflowId);
bulkResponse.appendSuccessResponse(workflowId);
Expand All @@ -140,7 +133,6 @@ public BulkResponse retry(List<String> workflowIds) {
public BulkResponse terminate(List<String> workflowIds, String reason) {
BulkResponse bulkResponse = new BulkResponse();
for (String workflowId : workflowIds) {
workflowExecutor.terminateWorkflow(workflowId, reason);
try {
workflowExecutor.terminateWorkflow(workflowId, reason);
bulkResponse.appendSuccessResponse(workflowId);
Expand Down

0 comments on commit 1510638

Please sign in to comment.