fix(connector): cancel the export poll when the panel closes or reloads
Deploy / deploy (push) Successful in 6m46s
Deploy / deploy (push) Successful in 6m46s
app.scheduleTask outlives the panel instance that armed it. The repeating task id was held in the pipelineState closure, so closing or reloading the panel took the id with it and left nothing able to cancel the task: it kept firing every 15 s for the rest of the AE session, and every tick landing while a modal dialog was open raised "Cannot run a script while a modal dialog is waiting for response." The id now lives in global scope beside the tick function that scheduleTask already evaluates there, so the next panel instance can still reach it. getPollTaskId and setPollTaskId wrap the access and treat anything that is not a positive number as no task. Panel startup cancels whatever a previous instance left armed before pointing the tick at itself, rather than letting the old task fire into a fresh, empty state whose shot code went with the closure that armed it, and panel.onClose stops the poll on the way out. The export is unaffected either way: it runs on the farm, and the header picks its status back up from the server on the next Refresh. Section 12.1 of RenderPipeline2.md records that. PANEL_VERSION goes to 2.6.1 per the documented rule, so Pipeline → Machines does not show two workstations on one version behaving differently. This change was authored in the working tree, not by Claude; it is committed here alongside the status and client-portal work at the author's request, and the message was written from reading the diff. It has not been exercised in a live After Effects session as part of this commit. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1292,6 +1292,11 @@ The panel keeps all existing capabilities (episode/shot discovery, overlays, pic
|
||||
| Latest Export + QC status | new E2 `exports/latest` — e.g. `v004 — READY_FOR_QC`, `v004 — RENDERING 42% (ETA 1:36 on RENDER-01)`, `v003 — QC FAILED: "grain mismatch"` |
|
||||
|
||||
While an export is active the panel polls E2 every 15 s to live-update the header.
|
||||
The poll stops when the export leaves an active status, and also when the panel is
|
||||
closed or reloaded — `app.scheduleTask` outlives the panel instance that armed it,
|
||||
so the task id is kept in ExtendScript global scope where the next instance can
|
||||
still cancel it. The export is unaffected either way: it runs on the farm, and the
|
||||
header picks its status back up on the next Refresh.
|
||||
|
||||
### 12.2 Buttons and their API calls
|
||||
|
||||
|
||||
Reference in New Issue
Block a user