Spaces:
Paused
Paused
Download src/helpers/bottleneck_tmdb.js from mikmc/random-test: direct link, hf CLI and curl.
- Browser
- Download file 308 Bytes
-
https://huggingface.co/spaces/mikmc/random-test/resolve/main/src/helpers/bottleneck_tmdb.js
- Command line
-
hf download hf://spaces/mikmc/random-test/src/helpers/bottleneck_tmdb.js
-
curl -L -o bottleneck_tmdb.js https://huggingface.co/spaces/mikmc/random-test/resolve/main/src/helpers/bottleneck_tmdb.js
308 Bytes
| const Bottleneck = require('bottleneck'); | |
| const tmdbLimiter = new Bottleneck({ | |
| reservoir: 50, | |
| reservoirRefreshAmount: 50, | |
| reservoirRefreshInterval: 1000, | |
| maxConcurrent: 20 | |
| }); | |
| const addToQueueTMDB = (task) => { | |
| return tmdbLimiter.schedule(task.fn); | |
| }; | |
| module.exports = addToQueueTMDB; | |