Run python nodes out of process, with modules of their own
User code no longer execs in the engine. A pool of persistent worker subprocesses speaks one JSON object per line; the controller installs a proxy as the node's function, so every execution path funnels through it and the pipeline is untouched. A crash costs one subprocess, a per-node timeout is a kill, and cancelling from the canvas is that same kill. The workers run a venv of the user's own on the data volume, filled from a pip manifest versioned beside the flows. Applying it retires the workers and rebuilds, so a package lands without restarting the engine. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017MeiWk3Yq12n2pTvnQWYvt
This commit is contained in:
@@ -934,6 +934,32 @@ function PanelBody({
|
||||
onChange={(params) => onChange({ ...node, params })}
|
||||
/>
|
||||
) : null}
|
||||
{hasSource ? (
|
||||
<div className="grid gap-1.5">
|
||||
<Label htmlFor="node-timeout" className={SECTION}>
|
||||
Timeout
|
||||
</Label>
|
||||
<Input
|
||||
id="node-timeout"
|
||||
type="number"
|
||||
min={0}
|
||||
step="any"
|
||||
className="h-8 text-sm"
|
||||
placeholder="30 (default)"
|
||||
value={node.timeout ? String(node.timeout) : ""}
|
||||
onChange={(event) =>
|
||||
onChange({
|
||||
...node,
|
||||
timeout: Number(event.target.value) || null,
|
||||
})
|
||||
}
|
||||
/>
|
||||
<p className="text-xs text-muted-foreground">
|
||||
Seconds this code may run before it is stopped. Above 60 the
|
||||
engine may deliver the same work again while it is still running.
|
||||
</p>
|
||||
</div>
|
||||
) : null}
|
||||
{hasSource ? (
|
||||
<SharingSection flow={flow} node={node} onShared={onShared} />
|
||||
) : null}
|
||||
|
||||
Reference in New Issue
Block a user