darabos commited on
Commit
9d09524
·
1 Parent(s): c577568

Fix mistakes.

Browse files
lynxkite-app/web/tests/errors.spec.ts CHANGED
@@ -35,7 +35,7 @@ test("unknown operation", async () => {
35
  await graphBox.getByLabel("n", { exact: true }).fill("10");
36
  await workspace.setEnv("Pillow");
37
  const csvBox = workspace.getBox("NX › Scale-Free Graph 1");
38
- await expect(csvBox.locator(".error")).toHaveText('Unknown operation.');
39
  await workspace.setEnv("LynxKite Graph Analytics");
40
  await expect(csvBox.locator(".error")).not.toBeVisible();
41
  });
 
35
  await graphBox.getByLabel("n", { exact: true }).fill("10");
36
  await workspace.setEnv("Pillow");
37
  const csvBox = workspace.getBox("NX › Scale-Free Graph 1");
38
+ await expect(csvBox.locator(".error")).toHaveText("Unknown operation.");
39
  await workspace.setEnv("LynxKite Graph Analytics");
40
  await expect(csvBox.locator(".error")).not.toBeVisible();
41
  });
lynxkite-core/src/lynxkite/core/executors/one_by_one.py CHANGED
@@ -159,12 +159,12 @@ async def _execute(ws: workspace.Workspace, catalog: ops.Catalog, cache=None):
159
  key = _make_cache_key((inputs, params))
160
  if key not in cache:
161
  result: ops.Result = op(*inputs, **params)
162
- result.output = await await_if_needed(result.output)
163
  cache[key] = result
164
  result = cache[key]
165
  else:
166
  result = op(*inputs, **params)
167
- output = await await_if_needed(result.output)
168
  except Exception as e:
169
  traceback.print_exc()
170
  node.publish_error(e)
@@ -178,7 +178,7 @@ async def _execute(ws: workspace.Workspace, catalog: ops.Catalog, cache=None):
178
  results.extend(output)
179
  else: # Finished all tasks without errors.
180
  if result.display:
181
- result.display = await await_if_needed(result.display)
182
  for edge in edges[node.id]:
183
  t = nodes[edge.target]
184
  op = catalog[t.data.title]
 
159
  key = _make_cache_key((inputs, params))
160
  if key not in cache:
161
  result: ops.Result = op(*inputs, **params)
162
+ result.output = await _await_if_needed(result.output)
163
  cache[key] = result
164
  result = cache[key]
165
  else:
166
  result = op(*inputs, **params)
167
+ output = await _await_if_needed(result.output)
168
  except Exception as e:
169
  traceback.print_exc()
170
  node.publish_error(e)
 
178
  results.extend(output)
179
  else: # Finished all tasks without errors.
180
  if result.display:
181
+ result.display = await _await_if_needed(result.display)
182
  for edge in edges[node.id]:
183
  t = nodes[edge.target]
184
  op = catalog[t.data.title]