Skip to content

Commit f4a23f7

Browse files
committed
Update backend timeseries publish
1 parent 40f351c commit f4a23f7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/ess/livedata/config/workflows.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,10 @@ def is_empty(self) -> bool:
7676
def _get_value(self) -> sc.DataArray:
7777
if self._to_nxlog is None:
7878
raise ValueError("No data accumulated")
79-
return self._to_nxlog.get()
79+
# Return latest value. Will be aggregated into a timeseries in frontend (if a
80+
# plot requests it). This accumulator may be fully replaced once it is clear how
81+
# we want to handle obtaining the full history (e.g., after frontend restarts).
82+
return self._to_nxlog.get()[-1]
8083

8184
def _do_push(self, value: sc.DataArray) -> None:
8285
if self._to_nxlog is None:

0 commit comments

Comments
 (0)