-
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.
[#186091347] Create endpoints to clean up a run
[#186091347] Create endpoints to clean up a run
- Loading branch information
Showing
16 changed files
with
681 additions
and
39 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
30 changes: 30 additions & 0 deletions
30
e2e-tests/src/main/resources/com/dnastack/wes/service/wdl/workflow_with_all_output_types.wdl
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,30 @@ | ||
task echo { | ||
String name | ||
command { | ||
echo "Hello ${name}" | ||
>&2 echo "Goodbye ${name}" | ||
echo "Bye" > "test.txt" | ||
echo "Bye" > "test2.txt" | ||
} | ||
|
||
runtime { | ||
docker: "ubuntu" | ||
} | ||
|
||
output { | ||
File out = stdout() | ||
File out2 = "test.txt" | ||
Array[File] arrayOut = [out, out2, "test2.txt"] | ||
} | ||
} | ||
|
||
workflow hello_world { | ||
String name | ||
call echo { | ||
input: | ||
name = name | ||
} | ||
output { | ||
File out = echo.out | ||
} | ||
} |
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,26 @@ | ||
package com.dnastack.wes.api; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.*; | ||
|
||
@Getter | ||
@Setter | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@EqualsAndHashCode | ||
@ToString | ||
@Builder | ||
public class RunFile { | ||
|
||
@JsonProperty(value = "file_type") | ||
FileType fileType; | ||
|
||
String path; | ||
|
||
public enum FileType { | ||
FINAL, | ||
SECONDARY, | ||
LOG | ||
} | ||
|
||
} |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package com.dnastack.wes.api; | ||
|
||
import java.util.List; | ||
|
||
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,32 @@ | ||
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.core.task.TaskExecutor; | ||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; | ||
|
||
import java.util.concurrent.ThreadPoolExecutor; | ||
|
||
@Slf4j | ||
@Configuration | ||
public class AsyncConfig { | ||
|
||
@Bean | ||
public TaskExecutor 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; | ||
} | ||
|
||
} |
Oops, something went wrong.