@ives_xxz/framework 1.2.4 → 1.2.5
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 +1 -1
- package/service/socket/FWSocket.ts +1 -1
- package/utils/FWTask.ts +10 -12
package/package.json
CHANGED
package/utils/FWTask.ts
CHANGED
|
@@ -20,13 +20,13 @@ export default class FWTask implements FW.Task {
|
|
|
20
20
|
|
|
21
21
|
readonly id: number;
|
|
22
22
|
|
|
23
|
-
constructor(options
|
|
24
|
-
this.id = options
|
|
23
|
+
constructor(options: FW.TaskOptions) {
|
|
24
|
+
this.id = options.taskId || Date.now();
|
|
25
25
|
this.taskCounter = 0;
|
|
26
26
|
this.totalTaskDuration = 0;
|
|
27
|
-
this.log = options
|
|
28
|
-
this.frameBudget = options
|
|
29
|
-
this.tasksFrameCount = options
|
|
27
|
+
this.log = options.log ?? true;
|
|
28
|
+
this.frameBudget = options.frameBudget ?? 16;
|
|
29
|
+
this.tasksFrameCount = options.tasksFrameCount ?? 3;
|
|
30
30
|
this.performanceData = {
|
|
31
31
|
frameTimes: [],
|
|
32
32
|
detailedFrames: [],
|
|
@@ -138,13 +138,11 @@ export default class FWTask implements FW.Task {
|
|
|
138
138
|
});
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
});
|
|
147
|
-
}
|
|
141
|
+
frameTasks.push({
|
|
142
|
+
taskId: taskId,
|
|
143
|
+
result: result.done ? FWEventDefine.TaskEvent.COMPLETE : FWEventDefine.TaskEvent.YIELDED,
|
|
144
|
+
message: (result?.value as any)?.message,
|
|
145
|
+
});
|
|
148
146
|
|
|
149
147
|
processed++;
|
|
150
148
|
}
|