@ejfdelgado/ejflab-common 1.11.2 → 1.12.0
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
|
@@ -720,6 +720,7 @@ class FlowChartExec {
|
|
|
720
720
|
}
|
|
721
721
|
);
|
|
722
722
|
} catch (err) {
|
|
723
|
+
console.log("executeAsArrow exception");
|
|
723
724
|
console.log(err);
|
|
724
725
|
resolve(
|
|
725
726
|
{
|
|
@@ -798,6 +799,7 @@ class FlowChartExec {
|
|
|
798
799
|
// Node fail
|
|
799
800
|
// Maybe handle to set maximum retries and exponetial back off
|
|
800
801
|
// Add visibility in somewhere
|
|
802
|
+
console.log("executeAsNode exception...");
|
|
801
803
|
console.log(err);
|
|
802
804
|
}
|
|
803
805
|
}
|
|
@@ -10,19 +10,24 @@ class CommandTimelineNext extends CommandBasic {
|
|
|
10
10
|
}
|
|
11
11
|
if ([null, undefined].indexOf(timeline.t) >= 0) {
|
|
12
12
|
timeline.t = timeline.start;
|
|
13
|
+
if (typeof timeline.n == "number" && timeline.n > 1) {
|
|
14
|
+
// Always start from the period and expect to read backwards
|
|
15
|
+
timeline.t = timeline.t + timeline.period;
|
|
16
|
+
}
|
|
17
|
+
} else {
|
|
18
|
+
timeline.t = timeline.t + timeline.period;
|
|
13
19
|
}
|
|
14
|
-
|
|
15
|
-
timeline.t = timeline.t + timeline.period;
|
|
20
|
+
|
|
16
21
|
if (timeline.t > timeline.end) {
|
|
17
22
|
timeline.t = timeline.end;
|
|
18
23
|
}
|
|
19
24
|
|
|
20
25
|
// Check if should create N array
|
|
21
|
-
if (typeof timeline.n == "number" && timeline.n >
|
|
26
|
+
if (typeof timeline.n == "number" && timeline.n > 1) {
|
|
22
27
|
const dperiod = timeline.period / timeline.n;
|
|
23
28
|
const list = new Array(timeline.n);
|
|
24
|
-
for (let i=0; i<list.length; i++) {
|
|
25
|
-
list[i] = {done: false};
|
|
29
|
+
for (let i = 0; i < list.length; i++) {
|
|
30
|
+
list[i] = { done: false };
|
|
26
31
|
}
|
|
27
32
|
timeline.dperiod = dperiod;
|
|
28
33
|
timeline.list = list;
|
|
@@ -120,7 +120,8 @@ class StepProcess extends StepBasic {
|
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
const room = this.context.getRoom();
|
|
123
|
-
const dbData = SimpleObj.getValue(this.context.data, `args.db`,
|
|
123
|
+
const dbData = SimpleObj.getValue(this.context.data, `args.db`, {});
|
|
124
|
+
const general = SimpleObj.getValue(this.context.data, `args.general`, {});
|
|
124
125
|
//console.log(`StepProcess processorName:${processorName} processorInstance:${processorInstance} processorMethod:${processorMethod} in room ${room}`);
|
|
125
126
|
this.messageUID = IdGen.num2ord(new Date().getTime());
|
|
126
127
|
this.pendingCall = `${room}-${this.id}-${this.messageUID}`;
|
|
@@ -136,7 +137,8 @@ class StepProcess extends StepBasic {
|
|
|
136
137
|
id: this.pendingCall,
|
|
137
138
|
data: this.configuration[instanceNumber],
|
|
138
139
|
room,
|
|
139
|
-
dbData
|
|
140
|
+
dbData,
|
|
141
|
+
general
|
|
140
142
|
};
|
|
141
143
|
//console.log("dbData="+JSON.stringify(dbData));
|
|
142
144
|
|