Skip to content

Commit daf9c79

Browse files
committed
Renamed schedulerSessionKillScanRate to schedulerSessionKillScanRateSeconds
1 parent 5391477 commit daf9c79

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

JShellAPI/src/main/java/org/togetherjava/jshellapi/Config.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ public record Config(
1010
long maxAliveSessions,
1111
int dockerMaxRamMegaBytes,
1212
double dockerCPUsUsage,
13-
long schedulerSessionKillScanRate) {
13+
long schedulerSessionKillScanRateSeconds) {
1414
public Config {
1515
if(regularSessionTimeoutSeconds <= 0) throw new RuntimeException("Invalid value " + regularSessionTimeoutSeconds);
1616
if(oneTimeSessionTimeoutSeconds <= 0) throw new RuntimeException("Invalid value " + oneTimeSessionTimeoutSeconds);
1717
if(evalTimeoutSeconds <= 0) throw new RuntimeException("Invalid value " + evalTimeoutSeconds);
1818
if(maxAliveSessions <= 0) throw new RuntimeException("Invalid value " + maxAliveSessions);
1919
if(dockerMaxRamMegaBytes <= 0) throw new RuntimeException("Invalid value " + dockerMaxRamMegaBytes);
2020
if(dockerCPUsUsage <= 0) throw new RuntimeException("Invalid value " + dockerCPUsUsage);
21-
if(schedulerSessionKillScanRate <= 0) throw new RuntimeException("Invalid value " + schedulerSessionKillScanRate);
21+
if(schedulerSessionKillScanRateSeconds <= 0) throw new RuntimeException("Invalid value " + schedulerSessionKillScanRateSeconds);
2222
}
2323
}

JShellAPI/src/main/java/org/togetherjava/jshellapi/service/JShellSessionService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ private void initScheduler() {
3131
ex.printStackTrace();
3232
}
3333
}
34-
}, config.schedulerSessionKillScanRate(), config.schedulerSessionKillScanRate(), TimeUnit.SECONDS);
34+
}, config.schedulerSessionKillScanRateSeconds(), config.schedulerSessionKillScanRateSeconds(), TimeUnit.SECONDS);
3535
}
3636
void notifyDeath(String id) {
3737
JShellService shellService = jshellSessions.get(id);

JShellAPI/src/main/resources/application.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ jshellapi.dockerMaxRamMegaBytes=100
1010
jshellapi.dockerCPUsUsage=0.5
1111

1212
# Internal config
13-
jshellapi.schedulerSessionKillScanRate=60
13+
jshellapi.schedulerSessionKillScanRateSeconds=60

0 commit comments

Comments
 (0)