@push.rocks/taskbuffer 3.1.8 → 3.1.10
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/dist_bundle/bundle.js +18 -8
- package/dist_bundle/bundle.js.map +2 -2
- package/dist_ts/00_commitinfo_data.js +2 -2
- package/dist_ts/taskbuffer.classes.bufferrunner.js +1 -1
- package/dist_ts/taskbuffer.classes.task.js +9 -4
- package/dist_ts/taskbuffer.classes.taskchain.js +1 -1
- package/dist_ts/taskbuffer.classes.taskdebounced.js +1 -1
- package/dist_ts/taskbuffer.classes.taskmanager.js +2 -2
- package/dist_ts/taskbuffer.classes.taskrunner.js +1 -1
- package/dist_ts/taskbuffer.plugins.d.ts +1 -1
- package/dist_ts/taskbuffer.plugins.js +2 -2
- package/npmextra.json +1 -1
- package/package.json +3 -3
- package/readme.md +407 -77
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/taskbuffer.classes.bufferrunner.ts +2 -3
- package/ts/taskbuffer.classes.distributedcoordinator.ts +2 -2
- package/ts/taskbuffer.classes.task.ts +15 -6
- package/ts/taskbuffer.classes.taskchain.ts +6 -2
- package/ts/taskbuffer.classes.taskdebounced.ts +3 -1
- package/ts/taskbuffer.classes.taskmanager.ts +13 -4
- package/ts/taskbuffer.classes.taskrunner.ts +2 -1
- package/ts/taskbuffer.plugins.ts +9 -1
package/dist_bundle/bundle.js
CHANGED
|
@@ -13257,9 +13257,7 @@ var BufferRunner = class {
|
|
|
13257
13257
|
if (!(this.bufferCounter >= this.task.bufferMax)) {
|
|
13258
13258
|
this.bufferCounter++;
|
|
13259
13259
|
}
|
|
13260
|
-
const returnPromise = this.task.cycleCounter.getPromiseForCycle(
|
|
13261
|
-
this.bufferCounter
|
|
13262
|
-
);
|
|
13260
|
+
const returnPromise = this.task.cycleCounter.getPromiseForCycle(this.bufferCounter);
|
|
13263
13261
|
if (!this.task.running) {
|
|
13264
13262
|
this._run(x);
|
|
13265
13263
|
}
|
|
@@ -13412,7 +13410,10 @@ var Task = class _Task {
|
|
|
13412
13410
|
}
|
|
13413
13411
|
}).then((x2) => {
|
|
13414
13412
|
if (taskToRun.afterTask && !_Task.isTaskTouched(taskToRun.afterTask, touchedTasksArray)) {
|
|
13415
|
-
return _Task.runTask(taskToRun.afterTask, {
|
|
13413
|
+
return _Task.runTask(taskToRun.afterTask, {
|
|
13414
|
+
x: x2,
|
|
13415
|
+
touchedTasksArray
|
|
13416
|
+
});
|
|
13416
13417
|
} else {
|
|
13417
13418
|
const done2 = dist_ts_exports.defer();
|
|
13418
13419
|
done2.resolve(x2);
|
|
@@ -13460,14 +13461,18 @@ var Taskchain = class extends Task {
|
|
|
13460
13461
|
let taskCounter = 0;
|
|
13461
13462
|
const iterateTasks = (x2) => {
|
|
13462
13463
|
if (typeof this.taskArray[taskCounter] !== "undefined") {
|
|
13463
|
-
console.log(
|
|
13464
|
+
console.log(
|
|
13465
|
+
this.name + " running: Task" + this.taskArray[taskCounter].name
|
|
13466
|
+
);
|
|
13464
13467
|
this.taskArray[taskCounter].trigger(x2).then((x3) => {
|
|
13465
13468
|
logger.log("info", this.taskArray[taskCounter].name);
|
|
13466
13469
|
taskCounter++;
|
|
13467
13470
|
iterateTasks(x3);
|
|
13468
13471
|
});
|
|
13469
13472
|
} else {
|
|
13470
|
-
console.log(
|
|
13473
|
+
console.log(
|
|
13474
|
+
'Taskchain "' + this.name + '" completed successfully'
|
|
13475
|
+
);
|
|
13471
13476
|
done.resolve(x2);
|
|
13472
13477
|
}
|
|
13473
13478
|
};
|
|
@@ -13565,7 +13570,10 @@ var TaskManager = class {
|
|
|
13565
13570
|
async (triggerTime) => {
|
|
13566
13571
|
this.logTaskState(task);
|
|
13567
13572
|
if (this.options.distributedCoordinator) {
|
|
13568
|
-
const announcementResult = await this.performDistributedConsultation(
|
|
13573
|
+
const announcementResult = await this.performDistributedConsultation(
|
|
13574
|
+
task,
|
|
13575
|
+
triggerTime
|
|
13576
|
+
);
|
|
13569
13577
|
if (!announcementResult.shouldTrigger) {
|
|
13570
13578
|
console.log("Distributed coordinator result: NOT EXECUTING");
|
|
13571
13579
|
return;
|
|
@@ -13705,7 +13713,9 @@ var TaskDebounced = class extends Task {
|
|
|
13705
13713
|
});
|
|
13706
13714
|
this._observableIntake = new dist_ts_exports4.ObservableIntake();
|
|
13707
13715
|
this.taskFunction = optionsArg.taskFunction;
|
|
13708
|
-
this._observableIntake.observable.pipe(
|
|
13716
|
+
this._observableIntake.observable.pipe(
|
|
13717
|
+
dist_ts_exports4.rxjs.ops.debounceTime(optionsArg.debounceTimeInMillis)
|
|
13718
|
+
).subscribe((x) => {
|
|
13709
13719
|
this.taskFunction(x);
|
|
13710
13720
|
});
|
|
13711
13721
|
}
|