You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@leafer/task

Package Overview
Dependencies
Maintainers
1
Versions
117
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@leafer/task - npm Package Compare versions

Comparing version
1.9.10
to
1.9.11
+4
-4
package.json
{
"name": "@leafer/task",
"version": "1.9.10",
"version": "1.9.11",
"description": "@leafer/task",

@@ -25,8 +25,8 @@ "author": "Chao (Leafer) Wan",

"dependencies": {
"@leafer/math": "1.9.10",
"@leafer/debug": "1.9.10"
"@leafer/math": "1.9.11",
"@leafer/debug": "1.9.11"
},
"devDependencies": {
"@leafer/interface": "1.9.10"
"@leafer/interface": "1.9.11"
}
}

@@ -162,5 +162,12 @@ import { IFunction, ITaskProcessor, ITaskProcessorConfig, ITaskOptions, ITaskItem } from '@leafer/interface'

if (!task) {
this.nextTask() // 存在延时任务
this.timer = setTimeout(() => this.nextTask()) // 存在延时任务
return
}
if (task.isCancel) {
this.index++
this.runTask()
return
}
task.run().then(() => {

@@ -203,15 +210,15 @@

let task: ITaskItem
const { config, list, index } = this
this.parallelList = []
this.parallelSuccessNumber = 0
let end = this.index + this.config.parallel
let end = index + config.parallel
if (end > this.list.length) end = this.list.length
if (end > list.length) end = list.length
for (let i = this.index; i < end; i++) {
task = this.list[i]
if (task.parallel) {
this.parallelList.push(task)
} else {
break
if (config.parallel > 1) {
for (let i = index; i < end; i++) {
task = list[i]
if (task.parallel) this.parallelList.push(task)
else break
}

@@ -218,0 +225,0 @@ }