dbm-graph-api 1.1.33 → 1.1.34
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
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import Dbm from "dbm";
|
|
2
2
|
import DbmGraphApi from "../../../index.js";
|
|
3
3
|
|
|
4
|
+
import { performance } from 'node:perf_hooks';
|
|
5
|
+
|
|
4
6
|
export default class ExternalTaskRunner extends Dbm.core.BaseObject {
|
|
5
7
|
|
|
6
8
|
_construct() {
|
|
@@ -43,10 +45,13 @@ export default class ExternalTaskRunner extends Dbm.core.BaseObject {
|
|
|
43
45
|
requestData["body"] = this.item.body;
|
|
44
46
|
}
|
|
45
47
|
|
|
48
|
+
let startTime = performance.now();
|
|
46
49
|
let response = await fetch(this.item.url, requestData);
|
|
47
50
|
|
|
48
51
|
let responseText = await response.text();
|
|
49
52
|
|
|
53
|
+
let endTime = performance.now();
|
|
54
|
+
|
|
50
55
|
let data = null;
|
|
51
56
|
try {
|
|
52
57
|
data = JSON.parse(responseText);
|
|
@@ -58,7 +63,8 @@ export default class ExternalTaskRunner extends Dbm.core.BaseObject {
|
|
|
58
63
|
|
|
59
64
|
if(data) {
|
|
60
65
|
let continueData = Dbm.objectPath(data, this.item.continueField);
|
|
61
|
-
|
|
66
|
+
let callTime = ((endTime-startTime)/1000).toFixed(3);
|
|
67
|
+
console.log(this.item.name + ` (time: ${callTime} continue: ${continueData})`);
|
|
62
68
|
|
|
63
69
|
if(continueData > 0) {
|
|
64
70
|
runDirect = true;
|