Skip to content

Commit

Permalink
Sort urls to make sure stability when retrying
Browse files Browse the repository at this point in the history
  • Loading branch information
jackalcooper committed Aug 13, 2024
1 parent f976626 commit 531570c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function generateMatrix(
maxParallel = Math.min(maxParallel, MAX_JOBS)
const chunkSize = Math.min(Math.ceil(urls.length / maxParallel), urls.length)
return {
task: _.chunk(_.shuffle(urls), chunkSize).map((chunk, index) => ({
task: _.chunk(_.sortBy(urls), chunkSize).map((chunk, index) => ({
urls: chunk.join('\n'),
id: `${index + 1}`,
size: chunk.length
Expand Down

0 comments on commit 531570c

Please sign in to comment.