Skip to content

Commit

Permalink
fields for execution barrier added
Browse files Browse the repository at this point in the history
  • Loading branch information
lungben committed Mar 9, 2021
1 parent e5b5c8d commit 5975d25
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions frontend/components/Editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ const Main = ({ children }) => {
* referenced_cells: ?{ string: [string]},
* dependent_cells: ?{ string: [string]},
* precedence_heuristic: ?number,
* has_execution_barrier: boolean,
* barrier_is_active: boolean,
* output: {
* body: string,
* persist_js_state: boolean,
Expand Down
5 changes: 5 additions & 0 deletions src/notebook/Cell.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ Base.@kwdef mutable struct Cell
referenced_cells:: Union{Missing, Dict{Symbol, Vector{UUID}}} = missing
dependent_cells:: Union{Missing, Dict{Symbol, Vector{UUID}}} = missing
precedence_heuristic:: Union{Missing, Int} = missing

# execution barrier
has_execution_barrier::Bool=false
barrier_is_active::Bool=false

end

Cell(cell_id, code) = Cell(cell_id=cell_id, code=code)
Expand Down
2 changes: 2 additions & 0 deletions src/webserver/Dynamic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ function notebook_to_js(notebook::Notebook)
"dependent_cells" => jsprepare_probably_missing(cell.dependent_cells, Dict()),
"precedence_heuristic" => jsprepare_probably_missing(cell.precedence_heuristic),
"runtime" => jsprepare_probably_missing(cell.runtime),
"has_execution_barrier" => cell.has_execution_barrier,
"barrier_is_active" => cell.barrier_is_active,
"output" => Dict(
"last_run_timestamp" => cell.last_run_timestamp,
"persist_js_state" => cell.persist_js_state,
Expand Down

0 comments on commit 5975d25

Please sign in to comment.