Skip to content

Commit

Permalink
Disable Malt by default
Browse files Browse the repository at this point in the history
  • Loading branch information
fonsp committed Sep 18, 2023
1 parent 07101de commit 27307e3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/Configuration.jl
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ end

const RUN_NOTEBOOK_ON_LOAD_DEFAULT = true
const WORKSPACE_USE_DISTRIBUTED_DEFAULT = true
const WORKSPACE_USE_DISTRIBUTED_STDLIB_DEFAULT = false
const WORKSPACE_USE_DISTRIBUTED_STDLIB_DEFAULT = nothing
const LAZY_WORKSPACE_CREATION_DEFAULT = false
const CAPTURE_STDOUT_DEFAULT = true
const WORKSPACE_CUSTOM_STARTUP_EXPR_DEFAULT = nothing
Expand All @@ -153,15 +153,15 @@ These options are not intended to be changed during normal use.
- `run_notebook_on_load::Bool = $RUN_NOTEBOOK_ON_LOAD_DEFAULT` Whether to evaluate a notebook on load.
- `workspace_use_distributed::Bool = $WORKSPACE_USE_DISTRIBUTED_DEFAULT` Whether to start notebooks in a separate process.
- `workspace_use_distributed_stdlib::Bool = $WORKSPACE_USE_DISTRIBUTED_STDLIB_DEFAULT` Should we use the Distributed stdlib to run processes? This has been replaced by Malt.jl, but you can use this option to get the old behaviour. Option be removed in the future.
- `workspace_use_distributed_stdlib::Bool? = $WORKSPACE_USE_DISTRIBUTED_STDLIB_DEFAULT` Should we use the Distributed stdlib to run processes? Distributed will be replaced by Malt.jl, you can use this option to already get the old behaviour. `nothing` means: determine automatically (which is currently the same as `true`).
- `lazy_workspace_creation::Bool = $LAZY_WORKSPACE_CREATION_DEFAULT`
- `capture_stdout::Bool = $CAPTURE_STDOUT_DEFAULT`
- `workspace_custom_startup_expr::Union{Nothing,Expr} = $WORKSPACE_CUSTOM_STARTUP_EXPR_DEFAULT` An expression to be evaluated in the workspace process before running notebook code.
"""
@option mutable struct EvaluationOptions
run_notebook_on_load::Bool = RUN_NOTEBOOK_ON_LOAD_DEFAULT
workspace_use_distributed::Bool = WORKSPACE_USE_DISTRIBUTED_DEFAULT
workspace_use_distributed_stdlib::Bool = WORKSPACE_USE_DISTRIBUTED_STDLIB_DEFAULT
workspace_use_distributed_stdlib::Union{Bool,Nothing} = WORKSPACE_USE_DISTRIBUTED_STDLIB_DEFAULT
lazy_workspace_creation::Bool = LAZY_WORKSPACE_CREATION_DEFAULT
capture_stdout::Bool = CAPTURE_STDOUT_DEFAULT
workspace_custom_startup_expr::Union{Nothing,Expr} = WORKSPACE_CUSTOM_STARTUP_EXPR_DEFAULT
Expand Down Expand Up @@ -295,7 +295,7 @@ function from_flat_kwargs(;

run_notebook_on_load::Bool = RUN_NOTEBOOK_ON_LOAD_DEFAULT,
workspace_use_distributed::Bool = WORKSPACE_USE_DISTRIBUTED_DEFAULT,
workspace_use_distributed_stdlib::Bool = WORKSPACE_USE_DISTRIBUTED_STDLIB_DEFAULT,
workspace_use_distributed_stdlib::Union{Bool,Nothing} = WORKSPACE_USE_DISTRIBUTED_STDLIB_DEFAULT,
lazy_workspace_creation::Bool = LAZY_WORKSPACE_CREATION_DEFAULT,
capture_stdout::Bool = CAPTURE_STDOUT_DEFAULT,
workspace_custom_startup_expr::Union{Nothing,Expr} = WORKSPACE_CUSTOM_STARTUP_EXPR_DEFAULT,
Expand Down
6 changes: 5 additions & 1 deletion src/evaluation/WorkspaceManager.jl
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ function make_workspace((session, notebook)::SN; is_offline_renderer::Bool=false

WorkerType = if is_offline_renderer || !session.options.evaluation.workspace_use_distributed
Malt.InProcessWorker
elseif session.options.evaluation.workspace_use_distributed_stdlib
elseif something(
session.options.evaluation.workspace_use_distributed_stdlib,
true
# VERSION < v"1.8.0-0"
)
Malt.DistributedStdlibWorker
else
Malt.Worker
Expand Down

0 comments on commit 27307e3

Please sign in to comment.