Skip to content

Commit

Permalink
spotless
Browse files Browse the repository at this point in the history
Signed-off-by: Kiran Prakash <awskiran@amazon.com>
  • Loading branch information
kiranprakash154 committed May 30, 2024
1 parent b3f71f2 commit 97a0986
Showing 1 changed file with 16 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,31 +34,31 @@ public class SandboxService extends AbstractLifecycleComponent {
private static final Logger logger = LogManager.getLogger(SandboxService.class);

private final SandboxUsageTracker sandboxUsageTracker;
// private final SandboxPruner sandboxPruner;
// private final SandboxPruner sandboxPruner;
private volatile Scheduler.Cancellable scheduledFuture;
// private final SandboxServiceSettings sandboxServiceSettings;
// private final SandboxServiceSettings sandboxServiceSettings;
private final ThreadPool threadPool;
private final ClusterService clusterService;

/**
* Guice managed constructor
*
* @param sandboxUsageTracker
// * @param sandboxPruner
// * @param sandboxServiceSettings
// * @param sandboxPruner
// * @param sandboxServiceSettings
* @param threadPool
*/
@Inject
public SandboxService(
SandboxUsageTracker sandboxUsageTracker,
// SandboxServiceSettings sandboxServiceSettings,
// SandboxPruner sandboxPruner,
// SandboxServiceSettings sandboxServiceSettings,
// SandboxPruner sandboxPruner,
ClusterService clusterService,
ThreadPool threadPool
) {
this.sandboxUsageTracker = sandboxUsageTracker;
// this.sandboxServiceSettings = sandboxServiceSettings;
// this.sandboxPruner = sandboxPruner;
// this.sandboxServiceSettings = sandboxServiceSettings;
// this.sandboxPruner = sandboxPruner;
this.clusterService = clusterService;
this.threadPool = threadPool;
}
Expand Down Expand Up @@ -88,14 +88,15 @@ private Set<Sandbox> getActiveSandboxes() {
@Override
protected void doStart() {
scheduledFuture = threadPool.scheduleWithFixedDelay(() -> {
try {
doRun();
} catch (Exception e) {
logger.debug("Exception occurred in Query Sandbox service", e);
}
},
try {
doRun();
} catch (Exception e) {
logger.debug("Exception occurred in Query Sandbox service", e);
}
},
new TimeValue(1, TimeUnit.SECONDS), // TODO get this from SandboxServiceSettings
ThreadPool.Names.GENERIC);
ThreadPool.Names.GENERIC
);
}

@Override
Expand Down

0 comments on commit 97a0986

Please sign in to comment.