multi-tasks 3.1.8 β†’ 3.1.9

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.
package/README.md CHANGED
@@ -10,6 +10,31 @@ Multi-tasks is a toolkit to manage long-term and large-scale parallel computing
10
10
  npm install multi-tasks
11
11
  ```
12
12
 
13
+ ## πŸŽ‰ What's New β€” Real-Time Monitoring Has Arrived! πŸŽ‰
14
+
15
+ **1. Install** the monitor:
16
+
17
+ ```bash
18
+ npm install multi-tasks-monitor
19
+ ```
20
+
21
+ **2. Start your multi-tasks run first** β€” the monitor reads the task folder, which only exists once your run has started. Then either:
22
+
23
+ - Easiest (multi-tasks 3.1.9+): your startup log prints the complete command β€” full task folder path included. Copy it into another terminal and run:
24
+
25
+ ```text
26
+ ****************************************************************
27
+ [Master]: monitor this task with:
28
+ npx multi-tasks-monitor --task-dir "D:\tasks\multitasks20260806..." --port 3777
29
+ ****************************************************************
30
+ ```
31
+
32
+ - Or just run `npx multi-tasks-monitor` and pick the task folder on the page with "Select Directory".
33
+
34
+ **3. Watch the monitor page.** The live dashboard opens in your browser automatically β€” and you can revisit http://localhost:3777 anytime. πŸš€
35
+
36
+ Running multi-tasks older than 3.1.9, or want the full command-line options? See the [multi-tasks-monitor](https://www.npmjs.com/package/multi-tasks-monitor) page.
37
+
13
38
  ### API:
14
39
 
15
40
  The API has three parts: the entry functions, the config options, and the `helper` object injected into `processTask`.
@@ -272,6 +297,7 @@ Unlike `retry_fails` (which re-runs only the failed tasks), `restart` re-runs **
272
297
 
273
298
  ### Changelog:
274
299
 
300
+ - 3.1.9 Print the multi-tasks-monitor command on startup
275
301
  - 3.1.8 Small refinements
276
302
  - 3.1.7 onFinish: iterate all succ/failed results via helper.foreachSuccResult/foreachErrorResult
277
303
  - 3.1.6 Fix silent task loss under heavy load with maxTaskRetries
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "multi-tasks",
3
- "version": "3.1.8",
3
+ "version": "3.1.9",
4
4
  "description": "Multi-process task scheduling based on Node.js cluster, with crash resume and failed-task restart support",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -225,6 +225,11 @@ const start = (config)=>{
225
225
  initPromise.then((updated_config)=>{
226
226
  console.log(` new tasks=${TaskMgr.getTasks('new').length}`);
227
227
  config = updated_config;
228
+ console.log('');//δ»₯δΈ‹: 配ε₯—η›‘ζŽ§ε·₯程命什提瀺, δ»… master 打印一欑, ζ˜Ÿε·θΎΉζ‘†ηͺε‡Ίζ˜Ύη€Ί
229
+ console.log('****************************************************************');
230
+ console.log('[Master]: monitor this task with:');
231
+ console.log(` npx multi-tasks-monitor --task-dir "${config.taskFolder}" --port 3777`);
232
+ console.log('****************************************************************');
228
233
  for (let i = 0; i < numOfWorkers; i++) {
229
234
  let worker = cluster.fork();
230
235
  initWorker(worker);