Skip to content

Commit a53dee8

Browse files
committed
[backend/frontend] Add output parser as condition of chaining injects
1 parent f3795b7 commit a53dee8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

openbas-api/src/main/java/io/openbas/scheduler/jobs/InjectsExecutionJob.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,13 @@
4646
@DisallowConcurrentExecution
4747
@RequiredArgsConstructor
4848
public class InjectsExecutionJob implements Job {
49+
50+
public static final String DEFAULT_EXECUTION_THRESHOLD_TIME_IN_MINUTS = "10";
51+
private static final long delayForSimulationCompletedEvent = 3600L;
52+
4953
private final Environment env;
5054
private int injectExecutionThreshold;
5155
private static final Logger LOGGER = Logger.getLogger(InjectsExecutionJob.class.getName());
52-
private static final long delayForSimulationCompletedEvent = 3600L;
5356

5457
private final InjectHelper injectHelper;
5558
private final ExerciseRepository exerciseRepository;
@@ -76,7 +79,7 @@ public class InjectsExecutionJob implements Job {
7679
private void init() {
7780
String threshold = env.getProperty("inject.execution.threshold.minutes");
7881
if (threshold == null || threshold.isBlank()) {
79-
threshold = "10";
82+
threshold = DEFAULT_EXECUTION_THRESHOLD_TIME_IN_MINUTS;
8083
}
8184
this.injectExecutionThreshold = Integer.parseInt(threshold);
8285
}

0 commit comments

Comments
 (0)