Skip to content

Commit

Permalink
Batch updates triggered by Pipeline data changes
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Dec 5, 2022
1 parent 3d439df commit 5ef847c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lumen/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,12 +244,16 @@ def _update_data(self, *events: param.Event, force: bool = False):
f._sync_refs()

try:
if pn.state.curdoc:
pn.state.curdoc.hold()
self.data = self._compute_data()
except Exception as e:
raise e
else:
self._stale = False
finally:
if pn.state.curdoc:
pn.state.curdoc.unhold()
self._update_widget.loading = False

@classmethod
Expand Down

0 comments on commit 5ef847c

Please sign in to comment.