Merge pull request #368 from madrang/HTTP503-Fix

Fix HTTP503 Error.
This commit is contained in:
cmdr2 2022-10-21 07:35:52 +05:30 committed by GitHub
commit 1bd7d40716
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -518,7 +518,7 @@ async function doMakeImage(task) {
})
renderRequest = await res.json()
// status_code 503, already a task running.
} while (renderRequest.status_code === 503 && await asyncDelay(RETRY_DELAY_IF_SERVER_IS_BUSY))
} while (res.status === 503 && await asyncDelay(RETRY_DELAY_IF_SERVER_IS_BUSY))
if (typeof renderRequest?.stream !== 'string') {
console.log('Endpoint response: ', renderRequest)