-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bdb534a
commit 18b45a1
Showing
11 changed files
with
155 additions
and
155 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.dnastack.wes.api; | ||
|
||
import com.fasterxml.jackson.annotation.JsonUnwrapped; | ||
|
||
public record RunFileDeletion(@JsonUnwrapped RunFile runFile, DeletionState state, @JsonUnwrapped ErrorResponse errorResponse) { | ||
|
||
public enum DeletionState { | ||
DELETED, | ||
ASYNC, | ||
FAILED | ||
} | ||
|
||
} |
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,5 @@ | ||
package com.dnastack.wes.api; | ||
|
||
import java.util.List; | ||
|
||
public record RunFileDeletions(List<RunFileDeletion> deletions) {} |
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 |
---|---|---|
@@ -1,28 +1,5 @@ | ||
package com.dnastack.wes.api; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.*; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
@Getter | ||
@Setter | ||
@AllArgsConstructor | ||
@EqualsAndHashCode | ||
@NoArgsConstructor | ||
@ToString | ||
@Builder | ||
public class RunFiles { | ||
|
||
@JsonProperty("files") | ||
List<RunFile> files; | ||
|
||
public void addRunFile(RunFile runFile) { | ||
if (files == null) { | ||
files = new ArrayList<>(); | ||
} | ||
files.add(runFile); | ||
} | ||
|
||
} | ||
public record RunFiles(List<RunFile> runFiles) {} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package com.dnastack.wes.config; | ||
|
||
import lombok.extern.slf4j.Slf4j; | ||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; | ||
|
||
import java.util.concurrent.ThreadPoolExecutor; | ||
|
||
@Slf4j | ||
@Configuration | ||
public class AsyncConfig { | ||
|
||
@Bean | ||
public ThreadPoolTaskExecutor defaultAsyncOperationExecutor( | ||
@Value("${app.executors.default.core-pool-size:8}") int corePoolSize, | ||
@Value("${app.executors.default.max-pool-size:16}") int maxPoolSize, | ||
@Value("${app.executors.default.queue-capacity:5000}") int queueCapacity | ||
) { | ||
final ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); | ||
executor.setCorePoolSize(corePoolSize); | ||
executor.setMaxPoolSize(maxPoolSize); | ||
executor.setQueueCapacity(queueCapacity); | ||
executor.setThreadNamePrefix("defaultAsyncOp-"); | ||
executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy()); | ||
executor.initialize(); | ||
return executor; | ||
} | ||
|
||
} |
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
Oops, something went wrong.