Skip to content

Commit

Permalink
Move blocking handling to the right level in the maintenance resource
Browse files Browse the repository at this point in the history
  • Loading branch information
ttiurani committed Dec 22, 2020
1 parent 1a715dc commit f96aab0
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ public MaintenanceResource(SchedulerService scheduler, MaintenanceService mainte
@ApiOperation(value = "Do maintenance on old workflow instances synchronously", response = MaintenanceResponse.class)
public Mono<ResponseEntity<?>> cleanupWorkflows(
@RequestBody @ApiParam(value = "Parameters for the maintenance process", required = true) MaintenanceRequest request) {
return handleExceptions(() -> {
return handleExceptions(() -> wrapBlocking(() -> {
MaintenanceConfiguration configuration = converter.convert(request);
MaintenanceResults results = maintenanceService.cleanupWorkflows(configuration);
return wrapBlocking(() -> ok(converter.convert(results)));
});
return ok(converter.convert(results));
}));
}

}

0 comments on commit f96aab0

Please sign in to comment.