fix: complete image_make asset delivery
This commit is contained in:
@@ -123,6 +123,9 @@ export function createImageMakeClient({
|
||||
|
||||
const deadline = Date.now() + overallTimeout;
|
||||
let job = created;
|
||||
if (!ACTIVE_STATUSES.has(String(job?.status ?? '')) && !job?.result && created?.status_url) {
|
||||
job = await safeJson(await request(created.status_url));
|
||||
}
|
||||
while (ACTIVE_STATUSES.has(String(job?.status ?? ''))) {
|
||||
if (Date.now() >= deadline) {
|
||||
throw createClientError('IMAGE_MAKE_TIMEOUT', '图片生成超时', { jobId });
|
||||
|
||||
Reference in New Issue
Block a user