mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-19 22:09:37 +00:00
fix: use e.detail.prompt_id consistently in handleExecutionInterrupted and handleExecutionSuccess
Previously these handlers mixed activeJobId with e.detail.prompt_id, which would cause bugs during concurrent execution when the active job differs from the job being interrupted/completed.
This commit is contained in:
@@ -285,7 +285,7 @@ export const useExecutionStore = defineStore('execution', () => {
|
||||
e: CustomEvent<ExecutionInterruptedWsMessage>
|
||||
) {
|
||||
const jobId = e.detail.prompt_id
|
||||
if (activeJobId.value) clearInitializationByJobId(activeJobId.value)
|
||||
clearInitializationByJobId(jobId)
|
||||
resetExecutionState(jobId)
|
||||
}
|
||||
|
||||
@@ -296,12 +296,10 @@ export const useExecutionStore = defineStore('execution', () => {
|
||||
}
|
||||
|
||||
function handleExecutionSuccess(e: CustomEvent<ExecutionSuccessWsMessage>) {
|
||||
if (isCloud && activeJobId.value) {
|
||||
useTelemetry()?.trackExecutionSuccess({
|
||||
jobId: activeJobId.value
|
||||
})
|
||||
}
|
||||
const jobId = e.detail.prompt_id
|
||||
if (isCloud && jobId) {
|
||||
useTelemetry()?.trackExecutionSuccess({ jobId })
|
||||
}
|
||||
resetExecutionState(jobId)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user