Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/drapegnik/jobs-runner
:arrow_forward: test task for workshop
https://github.com/drapegnik/jobs-runner
async javascript nodejs parallel test-task
Last synced: 3 days ago
JSON representation
:arrow_forward: test task for workshop
- Host: GitHub
- URL: https://github.com/drapegnik/jobs-runner
- Owner: Drapegnik
- Created: 2018-03-28T00:22:24.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-03-28T00:27:24.000Z (over 6 years ago)
- Last Synced: 2024-10-31T13:46:10.276Z (about 2 months ago)
- Topics: async, javascript, nodejs, parallel, test-task
- Language: JavaScript
- Size: 1.95 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# jobs-runner
:arrow_forward: test task for [workshop](https://www.facebook.com/events/2013393755356297/?notif_t=event_calendar_create¬if_id=1521623408595950)
## task
* Implement class `Parallel`, that run jobs in parallel (async).
* Can't run more than `n` jobs in one time (sets as `parallelJobs` in constructor).
* Should be work in different environments (`browser`, `node.js`, `React Native`) & pass the [test](https://gist.github.com/z4o4z/be8215262d3c6977a53c9e1213fb5280).### public `Parallel` api:
```js
class Parallel {
constructor({ parallelJobs }) {}
job(callback) {} // returns this
done(callback) {}
}
```## result
```
step0
step1
step2
step3
step4
onDone [ 'step0', 'step1', 'step2', 'step3', 'step4' ] before/after/step0/step1/after0-1/step2/step3/after2-3/step4/after4/
Thanks, all works fine
```