more debug
This commit is contained in:
parent
357ff5ffef
commit
c90018e06f
@ -263,7 +263,10 @@ const onFetch = (event: FetchEvent): void => {
|
||||
|
||||
log.debug('[fetch] file:', /* info, */fileName);
|
||||
|
||||
const promise = cancellablePromise.then(b => {
|
||||
event.respondWith(Promise.race([
|
||||
timeout(45 * 1000),
|
||||
new Promise<Response>((resolve) => { // пробую это чтобы проверить, не сдохнет ли воркер
|
||||
cancellablePromise.then(b => {
|
||||
const responseInit: ResponseInit = {};
|
||||
|
||||
if(rangeHeader) {
|
||||
@ -274,12 +277,11 @@ const onFetch = (event: FetchEvent): void => {
|
||||
}
|
||||
}
|
||||
|
||||
return new Response(b, responseInit);
|
||||
});
|
||||
resolve(new Response(b, responseInit));
|
||||
}).catch(err => {
|
||||
|
||||
event.respondWith(Promise.race([
|
||||
timeout(45 * 1000),
|
||||
promise
|
||||
});
|
||||
})
|
||||
]));
|
||||
|
||||
break;
|
||||
@ -332,7 +334,7 @@ const onFetch = (event: FetchEvent): void => {
|
||||
statusText: 'Partial Content',
|
||||
headers,
|
||||
}));
|
||||
});
|
||||
}).catch(err => {});
|
||||
})
|
||||
]));
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user