Addon Endpoint Poll
The polite way to wait for a host render to finish
- status_json
- result_json
- summary_json
The addon workflow in MKRShift Nodes is submit-then-poll: you POST a job to your host app (After Effects, Photoshop, Blender, whatever endpoint you've configured), and the job runs outside ComfyUI. Addon Endpoint Poll is the node that checks on it - and it's the one that turns "the render is running somewhere else" from a finger-crossing exercise into a deterministic pipeline step.
Here's the pattern: MKRAddonEndpointSubmit gives you a job_id. You hand that ID to Poll along with the same endpoint_plan_json, and Poll first GETs the status path to see whether the job is done. The plan's default status_path looks like /mkrshift/status/{job_id} - the node substitutes your actual ID in. If the status reports a finished state (the source accepts done, complete, completed, success, or succeeded), it then GETs the result_path to pull the finished result. Two requests, sequenced automatically, only when the job is actually complete.
What you get out
status_json- the raw status response, always fetchedresult_json- the result payload, populated only when the job finishedsummary_json- job ID, HTTP status codes, the normalized state string, and warnings
The result_json being empty when the job isn't done is the intended behavior, not a bug - that's what tells you the job is still running.
Installation
cd ComfyUI/custom_nodes
git clone https://github.com/criskb/MKRShift_Nodes
Restart ComfyUI, or grab it through ComfyUI Manager ("MKRShift Nodes"). No pip dependencies - this is stdlib HTTP plus JSON parsing.
Common issues
The state vocabulary is the biggest gotcha. Poll only fetches the result when the status matches its whitelist of done-ish words. If your host returns state: "finished" or status: "rendering done" or anything else, Poll reads it as not-done and result_json stays empty forever - you'll see the status logged correctly in status_json and wonder why the result never arrives. Fix the host's response to use one of the accepted words, or you'll be staring at a graph that runs happily and produces nothing.
Second: a stale or missing job_id means Poll hits a status URL with a blank ID - usually a malformed request rather than an error, so check the summary's status code if things look silent. And third, timeout_ms matters here more than on Submit: a slow host that takes longer than the timeout on any single request will error out mid-poll. That's from the plan, so bump it in MKRAddonEndpointPlan if your jobs are long. It's a small, focused node - but in a host-bridge workflow it's the difference between a pipeline that waits properly and one that needs a babysitter.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| endpoint_plan_json | STRING | {} | — |
| job_id | STRING | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| status_json | STRING | — |
| result_json | STRING | — |
| summary_json | STRING | — |