Spaces:
Running
Running
Sometimes there is no CRDT data?
Browse files
lynxkite-core/src/lynxkite/core/workspace.py
CHANGED
|
@@ -52,7 +52,7 @@ class WorkspaceNode(BaseConfig):
|
|
| 52 |
"""Notifies the frontend that work has started on this node."""
|
| 53 |
self.data.error = None
|
| 54 |
self.data.status = NodeStatus.active
|
| 55 |
-
if hasattr(self, "_crdt"):
|
| 56 |
with self._crdt.doc.transaction():
|
| 57 |
self._crdt["data"]["error"] = None
|
| 58 |
self._crdt["data"]["status"] = NodeStatus.active
|
|
@@ -63,7 +63,7 @@ class WorkspaceNode(BaseConfig):
|
|
| 63 |
self.data.input_metadata = result.input_metadata
|
| 64 |
self.data.error = result.error
|
| 65 |
self.data.status = NodeStatus.done
|
| 66 |
-
if hasattr(self, "_crdt"):
|
| 67 |
with self._crdt.doc.transaction():
|
| 68 |
try:
|
| 69 |
self._crdt["data"]["status"] = NodeStatus.done
|
|
|
|
| 52 |
"""Notifies the frontend that work has started on this node."""
|
| 53 |
self.data.error = None
|
| 54 |
self.data.status = NodeStatus.active
|
| 55 |
+
if hasattr(self, "_crdt") and "data" in self._crdt:
|
| 56 |
with self._crdt.doc.transaction():
|
| 57 |
self._crdt["data"]["error"] = None
|
| 58 |
self._crdt["data"]["status"] = NodeStatus.active
|
|
|
|
| 63 |
self.data.input_metadata = result.input_metadata
|
| 64 |
self.data.error = result.error
|
| 65 |
self.data.status = NodeStatus.done
|
| 66 |
+
if hasattr(self, "_crdt") and "data" in self._crdt:
|
| 67 |
with self._crdt.doc.transaction():
|
| 68 |
try:
|
| 69 |
self._crdt["data"]["status"] = NodeStatus.done
|