A local call waiting for a slot is reached by a stop, a delete or a cancel and ends without running; what a call emits after its flow was stopped is dropped as its result is; a node run by hand whose flow is stopped or deleted tells its caller but publishes no node_error; cancelling a node also ends its calls on workers
Docs / docs (push) Successful in 33s
Playwright Tests / test-playwright (1, 2) (push) Successful in 3m45s
Playwright Tests / test-playwright (2, 2) (push) Successful in 2m47s
pre-commit / pre-commit (push) Successful in 3m44s
Test Backend / test-backend (3.12) (push) Failing after 5m55s
Test Backend / test-backend (3.14) (push) Failing after 5m31s
Compose Smoke Test / test-compose (push) Successful in 33s
Playwright Tests / merge-reports (push) Successful in 1m19s
Docs / docs (push) Successful in 33s
Playwright Tests / test-playwright (1, 2) (push) Successful in 3m45s
Playwright Tests / test-playwright (2, 2) (push) Successful in 2m47s
pre-commit / pre-commit (push) Successful in 3m44s
Test Backend / test-backend (3.12) (push) Failing after 5m55s
Test Backend / test-backend (3.14) (push) Failing after 5m31s
Compose Smoke Test / test-compose (push) Successful in 33s
Playwright Tests / merge-reports (push) Successful in 1m19s
This commit is contained in:
@@ -43,6 +43,11 @@ RESERVED_SETTINGS = frozenset({"synchronous"})
|
||||
#: worker request carries it to ``fluksio.arrived()`` inside the node.
|
||||
ARRIVED: ContextVar[list[str] | None] = ContextVar("arrived", default=None)
|
||||
|
||||
#: What ``Pipeline.ended`` read for the running node's flow when its call
|
||||
#: began. What the call emits once that has moved is dropped, as is what it
|
||||
#: returns.
|
||||
STARTED: ContextVar[int | None] = ContextVar("started", default=None)
|
||||
|
||||
|
||||
class Node:
|
||||
"""
|
||||
@@ -466,8 +471,12 @@ class Node:
|
||||
if not outputs and not self.requires:
|
||||
ended = self._pipeline.ended(self.flow)
|
||||
collected = logs.Collector()
|
||||
with logs.capture(collected):
|
||||
outputs = self.f(params=self.params) or {}
|
||||
token = STARTED.set(ended)
|
||||
try:
|
||||
with logs.capture(collected):
|
||||
outputs = self.f(params=self.params) or {}
|
||||
finally:
|
||||
STARTED.reset(token)
|
||||
if self._pipeline is None or self._pipeline.ended(self.flow) != ended:
|
||||
# Its flow was stopped or deleted while it ran.
|
||||
return None
|
||||
@@ -492,7 +501,11 @@ class Node:
|
||||
:rtype: dict | None
|
||||
"""
|
||||
ended = self._pipeline.ended(self.flow) if self._pipeline is not None else 0
|
||||
outputs = self.execute(inputs)
|
||||
token = STARTED.set(ended)
|
||||
try:
|
||||
outputs = self.execute(inputs)
|
||||
finally:
|
||||
STARTED.reset(token)
|
||||
if self._pipeline is None:
|
||||
return outputs
|
||||
if self._pipeline.ended(self.flow) != ended:
|
||||
|
||||
Reference in New Issue
Block a user