Skip to content

Instantly share code, notes, and snippets.

@exhesham
Created December 12, 2021 08:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save exhesham/b25b6149a8ff19b9b362ce4e0d715004 to your computer and use it in GitHub Desktop.
Save exhesham/b25b6149a8ff19b9b362ce4e0d715004 to your computer and use it in GitHub Desktop.
batch run 1
const chunkSize = 3;
const numberOfTasks = 10;
let tasksSleepInput = Array(numberOfTasks).fill(30).map(v => ({delay: v, index: '' }));
// add indices
Object.keys(tasksSleepInput).forEach(k => tasksSleepInput[Number.parseInt(k)].index = k);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment