mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-05 15:40:10 +00:00
fix: logs stops listening after 1st of multiple queue tasks
This commit is contained in:
@@ -93,7 +93,9 @@ export const useServerLogs = (options: UseServerLogsOptions) => {
|
|||||||
stopLogs = null
|
stopLogs = null
|
||||||
stopTaskStarted = null
|
stopTaskStarted = null
|
||||||
stopTaskDone = null
|
stopTaskDone = null
|
||||||
await api.subscribeLogs(false)
|
// TODO: move subscribe/unsubscribe logs to useManagerQueue. Subscribe when task starts if not already subscribed.
|
||||||
|
// Unsubscribe ONLY when there are no tasks running or queued up and the only remaining task finishes.
|
||||||
|
// await api.subscribeLogs(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (immediate) {
|
if (immediate) {
|
||||||
|
|||||||
@@ -178,8 +178,9 @@ export const useComfyManagerStore = defineStore('comfyManager', () => {
|
|||||||
taskName: string
|
taskName: string
|
||||||
) => {
|
) => {
|
||||||
const taskId = uuidv4()
|
const taskId = uuidv4()
|
||||||
const { startListening, logs } = useServerLogs({
|
const { logs } = useServerLogs({
|
||||||
ui_id: taskId
|
ui_id: taskId,
|
||||||
|
immediate: true
|
||||||
})
|
})
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -189,7 +190,6 @@ export const useComfyManagerStore = defineStore('comfyManager', () => {
|
|||||||
|
|
||||||
// Prepare logging hook
|
// Prepare logging hook
|
||||||
taskLogs.value.push({ taskName, taskId, logs: logs.value })
|
taskLogs.value.push({ taskName, taskId, logs: logs.value })
|
||||||
await startListening()
|
|
||||||
|
|
||||||
// Queue the task to the server
|
// Queue the task to the server
|
||||||
await task(taskId)
|
await task(taskId)
|
||||||
|
|||||||
Reference in New Issue
Block a user