Skip to content

Commit

Permalink
Make persistRun transactional
Browse files Browse the repository at this point in the history
Signed-off-by: Andrea Lamparelli <[email protected]>
  • Loading branch information
lampajr committed Jan 16, 2025
1 parent ba3696c commit ce172d2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ Response add(@QueryParam("test") String testNameOrId,
@Parameter(name = "description", description = "Run description", example = "AWS runs"),

})
@Produces(MediaType.TEXT_PLAIN)
@APIResponses(value = {
@APIResponse(responseCode = "202", description = "The request has been accepted for processing. Returns a list of created run IDs if available, "
+ "or an empty list if processing is still ongoing. Label values and change detection processing " +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,7 @@ Response addRunFromData(String start, String stop, String test,
.build();
}

@Transactional
void persistRun(ServiceMediator.RunUpload runUpload) {
runUpload.roles.add("horreum.system");
roleManager.setRoles(String.join(",", runUpload.roles));
Expand Down

0 comments on commit ce172d2

Please sign in to comment.