mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
possible slow cure for poe
This commit is contained in:
@@ -327,6 +327,7 @@ async function request_with_retries(method, attempts = 10) {
|
|||||||
} catch (err) {
|
} catch (err) {
|
||||||
var ErrorHasFreeSocket = false;
|
var ErrorHasFreeSocket = false;
|
||||||
const circularReference = new Set();
|
const circularReference = new Set();
|
||||||
|
//const errStringRaw = JSON.stringify(err, null, 4)
|
||||||
const errString = JSON.stringify(err, function (key, value) {
|
const errString = JSON.stringify(err, function (key, value) {
|
||||||
if (key === 'data' && Array.isArray(value)) {
|
if (key === 'data' && Array.isArray(value)) {
|
||||||
return '[removed data spam]';
|
return '[removed data spam]';
|
||||||
@@ -360,11 +361,14 @@ async function request_with_retries(method, attempts = 10) {
|
|||||||
}
|
}
|
||||||
return value;
|
return value;
|
||||||
}, 4);
|
}, 4);
|
||||||
|
//fs.writeFile('poe-error-raw.log', errStringRaw, 'utf-8', (err) => {
|
||||||
|
// console.log(`Error saved to poe-error-raw.log`);
|
||||||
|
//});
|
||||||
fs.writeFile('poe-error.log', errString, 'utf-8', (err) => {
|
fs.writeFile('poe-error.log', errString, 'utf-8', (err) => {
|
||||||
if (err) throw err;
|
if (err) throw err;
|
||||||
console.log(`Error saved to poe-error.log Free socket? ${ErrorHasFreeSocket}`);
|
console.log(`Error saved to poe-error.log Free socket? ${ErrorHasFreeSocket}`);
|
||||||
});
|
});
|
||||||
await delay(100)
|
await delay(3000)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw new Error(`Failed to download too many times.`);
|
throw new Error(`Failed to download too many times.`);
|
||||||
|
Reference in New Issue
Block a user