From 5975d25b5ccc63eabca7d233bc0dc2974cf763fa Mon Sep 17 00:00:00 2001 From: Benjamin Lungwitz Date: Tue, 9 Mar 2021 10:51:25 +0100 Subject: [PATCH] fields for execution barrier added --- frontend/components/Editor.js | 2 ++ src/notebook/Cell.jl | 5 +++++ src/webserver/Dynamic.jl | 2 ++ 3 files changed, 9 insertions(+) diff --git a/frontend/components/Editor.js b/frontend/components/Editor.js index d5443eafb5..d1b9064b1d 100644 --- a/frontend/components/Editor.js +++ b/frontend/components/Editor.js @@ -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, diff --git a/src/notebook/Cell.jl b/src/notebook/Cell.jl index ab61adde49..f1ffae70ad 100644 --- a/src/notebook/Cell.jl +++ b/src/notebook/Cell.jl @@ -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) diff --git a/src/webserver/Dynamic.jl b/src/webserver/Dynamic.jl index 6723aa15d6..e585442508 100644 --- a/src/webserver/Dynamic.jl +++ b/src/webserver/Dynamic.jl @@ -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,