mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix comfy request abort
This commit is contained in:
@ -533,6 +533,7 @@ comfy.post('/delete-workflow', jsonParser, async (request, response) => {
|
|||||||
|
|
||||||
comfy.post('/generate', jsonParser, async (request, response) => {
|
comfy.post('/generate', jsonParser, async (request, response) => {
|
||||||
try {
|
try {
|
||||||
|
let item;
|
||||||
const url = new URL(urlJoin(request.body.url, '/prompt'));
|
const url = new URL(urlJoin(request.body.url, '/prompt'));
|
||||||
|
|
||||||
const controller = new AbortController();
|
const controller = new AbortController();
|
||||||
@ -557,7 +558,6 @@ comfy.post('/generate', jsonParser, async (request, response) => {
|
|||||||
/** @type {any} */
|
/** @type {any} */
|
||||||
const data = await promptResult.json();
|
const data = await promptResult.json();
|
||||||
const id = data.prompt_id;
|
const id = data.prompt_id;
|
||||||
let item;
|
|
||||||
const historyUrl = new URL(urlJoin(request.body.url, '/history'));
|
const historyUrl = new URL(urlJoin(request.body.url, '/history'));
|
||||||
while (true) {
|
while (true) {
|
||||||
const result = await fetch(historyUrl);
|
const result = await fetch(historyUrl);
|
||||||
|
Reference in New Issue
Block a user