multi-tasks 1.2.6 → 1.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +7 -5
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -45,13 +45,13 @@ multiTasks({
45
45
  quotaOfEachTask:1, //The number of subtasks assigned to each worker at one time, the default is 1
46
46
  numberOfWorkers: 6, //Assign how many workers are working in parallel, default is the number of cpu cores minus one
47
47
  onFinish: (report)=>{
48
- console.log(report);//the execution report can be viewed here
48
+ console.log(report);//the report can be viewed here
49
49
  }
50
50
  });
51
51
 
52
52
  ```
53
53
 
54
- Or, to provide the Producer & Consumer
54
+ Or the older way, to provide the Producer & Consumer
55
55
 
56
56
  ```javascript
57
57
  let master = require('multi-tasks').master;
@@ -59,9 +59,10 @@ let RunnerProducer;//See examples, please provide a Producer class to specify al
59
59
  let RunnerConsumer;//See examples, please provide a Consumer class to process a certain sub-task and return the processed data
60
60
 
61
61
  master.start(RunnerProducer, RunnerConsumer, {
62
- multi_task_parent_folder: `C:/tmp-demo`,
63
- quotaOfEachTask:2, //The number of tasks assigned to each worker
64
- numberOfWorkers: 6
62
+ multi_task_parent_folder,
63
+ quotaOfEachTask,
64
+ numberOfWorkers,
65
+ onFinish
65
66
  });
66
67
  ```
67
68
 
@@ -74,6 +75,7 @@ node examples/example1/run
74
75
 
75
76
  Changelog:
76
77
 
78
+ - 1.2.7 Small updates
77
79
  - 1.2.6 Support onFinish event
78
80
  - 1.2.5 Rename numberOfWorks to numberOfWorkers, the old one are still supported ;-)
79
81
  - 1.2.4 Fix: opt.numberOfWorkers not work
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "multi-tasks",
3
- "version": "1.2.6",
3
+ "version": "1.2.7",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "directories": {