forked from extern/easydiffusion
Failed task go immediately into the buffer state with the error.
This commit is contained in:
parent
476e938d23
commit
f91c77bdc6
@ -541,12 +541,13 @@ async function doMakeImage(task) {
|
|||||||
throw new Error('Connexion with server lost.')
|
throw new Error('Connexion with server lost.')
|
||||||
}
|
}
|
||||||
} while (serverState.time > (Date.now() - (10 * 1000)) && serverState.task !== renderRequest.task)
|
} while (serverState.time > (Date.now() - (10 * 1000)) && serverState.task !== renderRequest.task)
|
||||||
if (serverState.session !== 'pending' && serverState.session !== 'running') {
|
if (serverState.session !== 'pending' && serverState.session !== 'running' && serverState.session !== 'buffer') {
|
||||||
throw new Error('Unexpected server task state: ' + serverState.session || 'Undefined')
|
throw new Error('Unexpected server task state: ' + serverState.session || 'Undefined')
|
||||||
}
|
}
|
||||||
do { // Wait for task to start on server.
|
while (serverState?.session === 'pending') {
|
||||||
|
// Wait for task to start on server.
|
||||||
await asyncDelay(1500)
|
await asyncDelay(1500)
|
||||||
} while (serverState?.session === 'pending')
|
}
|
||||||
|
|
||||||
// Task started!
|
// Task started!
|
||||||
res = await fetch(renderRequest.stream, {
|
res = await fetch(renderRequest.stream, {
|
||||||
|
Loading…
Reference in New Issue
Block a user