Skip to content

Commit

Permalink
dbeaver/pro#3465 Make use of java.time.Duration in PeriodicJob
Browse files Browse the repository at this point in the history
  • Loading branch information
ShadelessFox committed Oct 31, 2024
1 parent 339b6ca commit 40c1b9f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,14 @@
import org.jkiss.dbeaver.model.runtime.DBRProgressMonitor;
import org.jkiss.dbeaver.model.runtime.PeriodicJob;

import java.time.Duration;

public class SessionStateJob extends PeriodicJob {
private static final Log log = Log.getLog(SessionStateJob.class);
private static final int PERIOD_MS = 30_000; // once per 30 seconds
private final WebSessionManager sessionManager;

public SessionStateJob(@NotNull DBPPlatform platform, WebSessionManager sessionManager) {
super("Session state sender", platform, PERIOD_MS);
super("Session state sender", platform, Duration.ofSeconds(30));
this.sessionManager = sessionManager;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,17 @@
import org.jkiss.dbeaver.model.runtime.DBRProgressMonitor;
import org.jkiss.dbeaver.model.runtime.PeriodicJob;

import java.time.Duration;

/**
* WebSessionMonitorJob
*/
public class WebSessionMonitorJob extends PeriodicJob {
private static final Log log = Log.getLog(WebSessionMonitorJob.class);
private static final int MONITOR_INTERVAL = 10000; // once per 10 seconds
private final WebSessionManager sessionManager;

public WebSessionMonitorJob(@NotNull DBPPlatform platform, @NotNull WebSessionManager sessionManager) {
super("Web session monitor", platform, MONITOR_INTERVAL);
super("Web session monitor", platform, Duration.ofSeconds(10));
this.sessionManager = sessionManager;
}

Expand Down

0 comments on commit 40c1b9f

Please sign in to comment.