flexbiz-server 12.5.23 → 12.5.24
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/package.json
CHANGED
|
@@ -73,7 +73,7 @@ class WorkerPool {
|
|
|
73
73
|
|
|
74
74
|
this.queue_running = this.queue_running.filter(q=>q.id!==task.id);
|
|
75
75
|
|
|
76
|
-
console.log("[WorkerStaticPool] Các loại kết quả trả về...",Object.keys(message));
|
|
76
|
+
//console.log("[WorkerStaticPool] Các loại kết quả trả về...",Object.keys(message));
|
|
77
77
|
console.log("[WorkerStaticPool] data type is buffer",Buffer.isBuffer(message?.result?.data));
|
|
78
78
|
|
|
79
79
|
task.callback(message,task.id);
|
|
@@ -31,14 +31,15 @@ const handleReport =async (msg)=>{
|
|
|
31
31
|
}
|
|
32
32
|
})
|
|
33
33
|
}
|
|
34
|
-
//Chỉ parse lại nếu không phải là buffer
|
|
35
|
-
|
|
36
34
|
if(!result?.data || !Buffer.isBuffer(result?.data)){
|
|
37
|
-
|
|
35
|
+
try {
|
|
36
|
+
result = structuredClone(result);
|
|
37
|
+
} catch (e) {
|
|
38
|
+
result = JSON.parse(JSON.stringify(result));
|
|
39
|
+
}
|
|
38
40
|
}
|
|
39
|
-
|
|
40
41
|
//console.log("[reportWorker] result type",typeof(result));
|
|
41
|
-
console.log("[reportWorker] data type is buffer",Buffer.isBuffer(result?.data));//true
|
|
42
|
+
console.log("[reportWorker] data type is buffer:",Buffer.isBuffer(result?.data));//true nhưng parent lại nhận được là một object không phải là buffer
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
parentPort.postMessage({
|