Skip to content

Commit

Permalink
Use an ExecutionContext with an AuthContext during DeephavenApiServer…
Browse files Browse the repository at this point in the history
…#run (#4033)
  • Loading branch information
nbauernfeind authored and devinrsmith committed Jun 22, 2023
1 parent 43e0a7f commit e9ae5e8
Showing 1 changed file with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,24 +126,23 @@ public DeephavenApiServer run() throws IOException, ClassNotFoundException, Time
AbstractScriptSession.createScriptCache();

log.info().append("Initializing Script Session...").endl();

scriptSessionProvider.get();
pluginRegistration.registerAll();

log.info().append("Initializing ExecutionContext for Main Thread...").endl();
// noinspection resource
executionContextProvider.get().open();

log.info().append("Starting UpdateGraph...").endl();
ug.<PeriodicUpdateGraph>cast().start();

try (final SafeCloseable ignored = ExecutionContext.getContext().withUpdateGraph(ug).open()) {
EngineMetrics.maybeStartStatsCollection();
}
EngineMetrics.maybeStartStatsCollection();

log.info().append("Starting Performance Trackers...").endl();
QueryPerformanceRecorder.installPoolAllocationRecorder();
QueryPerformanceRecorder.installUpdateGraphLockInstrumentation();
try (final SafeCloseable ignored = ExecutionContext.getContext().withUpdateGraph(ug).open()) {
UpdatePerformanceTracker.start();
ServerStateTracker.start();
}
UpdatePerformanceTracker.start();
ServerStateTracker.start();

for (UriResolver resolver : uriResolvers.resolvers()) {
log.debug().append("Found table resolver ").append(resolver.getClass().toString()).endl();
Expand Down

0 comments on commit e9ae5e8

Please sign in to comment.