mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
judge: pass 'this' param to download (strict mode)
This commit is contained in:
1 parent
d0592eac5b
commit
7006457001
2 files changed
+2
-2
No files matched your search
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/hydrojudge",
|
"name": "@hydrooj/hydrojudge",
|
||||||
"bin": "bin/hydrojudge.js",
|
"bin": "bin/hydrojudge.js",
|
||||||
"version": "2.9.4",
|
"version": "2.9.5",
|
||||||
"main": "package.json",
|
"main": "package.json",
|
||||||
"author": "undefined <i@undefined.moe>",
|
"author": "undefined <i@undefined.moe>",
|
||||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||||
|
|||||||
@@ -233,7 +233,7 @@ export default class Hydro {
|
|||||||
const tasks = [];
|
const tasks = [];
|
||||||
const queue = new PQueue({ concurrency: 10 });
|
const queue = new PQueue({ concurrency: 10 });
|
||||||
for (const name in res.data.links) {
|
for (const name in res.data.links) {
|
||||||
tasks.push(queue.add(() => download(name)));
|
tasks.push(queue.add(() => download.call(this, name)));
|
||||||
}
|
}
|
||||||
queue.start();
|
queue.start();
|
||||||
await Promise.all(tasks);
|
await Promise.all(tasks);
|
||||||
|
|||||||
Reference in new issue
Block a user