Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move Script Cache Clearing to Dagger #5436

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import io.deephaven.engine.updategraph.OperationInitializer;
import io.deephaven.engine.updategraph.UpdateGraph;
import io.deephaven.engine.updategraph.impl.PeriodicUpdateGraph;
import io.deephaven.engine.util.AbstractScriptSession;
import io.deephaven.engine.util.NoLanguageDeephavenSession;
import io.deephaven.engine.util.ScriptSession;
import io.deephaven.server.console.groovy.InitScriptsModule;
Expand All @@ -29,6 +30,8 @@ ScriptSession bindScriptSession(NoLanguageDeephavenSession noLanguageSession) {
NoLanguageDeephavenSession bindNoLanguageSession(
@Named(PeriodicUpdateGraph.DEFAULT_UPDATE_GRAPH_NAME) final UpdateGraph updateGraph,
final OperationInitializer operationInitializer) {
// create the script cache (or clear previous sessions)
AbstractScriptSession.createScriptCache();
return new NoLanguageDeephavenSession(updateGraph, operationInitializer);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import io.deephaven.engine.updategraph.OperationInitializer;
import io.deephaven.engine.updategraph.UpdateGraph;
import io.deephaven.engine.updategraph.impl.PeriodicUpdateGraph;
import io.deephaven.engine.util.AbstractScriptSession;
import io.deephaven.engine.util.GroovyDeephavenSession;
import io.deephaven.engine.util.GroovyDeephavenSession.RunScripts;
import io.deephaven.engine.util.ScriptSession;
Expand All @@ -36,6 +37,8 @@ GroovyDeephavenSession bindGroovySession(
final ScriptSession.Listener listener,
final RunScripts runScripts) {
try {
// create the script cache (or clear previous sessions)
AbstractScriptSession.createScriptCache();
return GroovyDeephavenSession.of(updateGraph, operationInitializer, lookup, listener, runScripts);
} catch (final IOException e) {
throw new UncheckedIOException(e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import io.deephaven.engine.updategraph.OperationInitializer;
import io.deephaven.engine.updategraph.UpdateGraph;
import io.deephaven.engine.updategraph.impl.PeriodicUpdateGraph;
import io.deephaven.engine.util.AbstractScriptSession;
import io.deephaven.engine.util.PythonEvaluatorJpy;
import io.deephaven.engine.util.ScriptSession;
import io.deephaven.integrations.python.PythonDeephavenSession;
Expand Down Expand Up @@ -38,6 +39,8 @@ PythonDeephavenSession bindPythonSession(
final ScriptSession.Listener listener,
final PythonEvaluatorJpy pythonEvaluator) {
try {
// create the script cache (or clear previous sessions)
AbstractScriptSession.createScriptCache();
return new PythonDeephavenSession(
updateGraph, operationInitializer, threadInitializationFactory, lookup, listener,
true, pythonEvaluator);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,6 @@ public DeephavenApiServer run() throws IOException, ClassNotFoundException, Time
log.info().append("Configuring logging...").endl();
logInit.run();

log.info().append("Creating/Clearing Script Cache...").endl();
AbstractScriptSession.createScriptCache();

for (BusinessCalendar calendar : calendars.get()) {
Calendars.addCalendar(calendar);
}
Expand Down
Loading