Modeling a Queue
- Dominant language
- JavaScript
- Stars
- 3.4k
- Forks
- 145
- PR merge metrics
- No merged PRs in 30d
Description
I'm working on the final part of this build server project. After testing out the workflow it turns out webpack uses a ton of CPU usage & memory during the minification process. So my app architecture needs to be changed so that the webserver just appends to a build queue so that only one build happens at one time.
Is this something that can be easily modeled in Highland? Or does it involve storing an array as my queue then when a build completes using a tap method at the end of a build stream to push the next oldest request from that queue onto the build stream?
```js
let queue = _().series().through(buildProcess).pipe(writableLogStream);
_.of(buildRequest)
.through(getLastBuild)
.through(getAssetVersion)
.through((stream) => {
queue.write(stream.observe());
return stream;
});
```
Contributor guide
Assessment
This issue has not been assessed yet.