Skip to content

Commit

Permalink
Merge pull request #832 from CorrelAid/831-increase-timeout-for-image…
Browse files Browse the repository at this point in the history
…-download-script

close #831
  • Loading branch information
jstet authored Dec 27, 2024
2 parents e68bae2 + f5e5242 commit dc60355
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dl_external_imgs.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dotenv.config({
dotenv.config({path: path.resolve(process.cwd(), '.env.local')});
dotenv.config({path: path.resolve(process.cwd(), '.env')});

const jitterMultiplier = 1000;
const jitterMultiplier = 1500;

const URL = `${process.env.PUBLIC_API_URL}/assets`;

Expand All @@ -37,7 +37,7 @@ async function postbuild() {
filesOnly: true,
});

const concurrencyLimit = 10;
const concurrencyLimit = 9;

// Create an array of promises for file processing
const filePromises = files.map(async (file, index) => {
Expand Down Expand Up @@ -124,7 +124,7 @@ async function findUrls(fileContent, filePath) {
const timeoutPromise = new Promise((resolve, reject) => {
setTimeout(() => {
reject(new Error(`Request for ${url} timed out`));
}, 25000);
}, 50000);
});

try {
Expand Down

0 comments on commit dc60355

Please sign in to comment.