@lossless.org/client 1.16.0 → 1.17.1
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/.smartconfig.json +20 -0
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/nosqldb/classes.collection.d.ts +6 -1
- package/dist_ts/nosqldb/classes.collection.js +13 -2
- package/dist_ts/nosqldb/classes.distributedcoordinator.js +7 -7
- package/dist_ts/nosqldb/classes.doc.d.ts +79 -14
- package/dist_ts/nosqldb/classes.doc.js +395 -37
- package/dist_ts/nosqldb/classes.easystore.js +2 -2
- package/dist_ts/nosqldb/classes.watcher.js +2 -2
- package/dist_ts/nosqldb/plugins.d.ts +1 -2
- package/dist_ts/nosqldb/plugins.js +2 -3
- package/dist_ts/sqldb/clickhouse/smartclickhouse.classes.clickhousetable.js +2 -2
- package/dist_ts/sqldb/clickhouse/smartclickhouse.classes.smartclickhouse.js +2 -2
- package/dist_ts/sqldb/clickhouse/smartclickhouse.plugins.d.ts +1 -2
- package/dist_ts/sqldb/clickhouse/smartclickhouse.plugins.js +2 -3
- package/licenses/SOURCES.md +13 -0
- package/licenses/aws-sdk-js-v3.txt +201 -0
- package/licenses/nodable-entities.txt +21 -0
- package/package.json +4 -3
- package/readme.md +4 -2
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/nosqldb/classes.collection.ts +15 -1
- package/ts/nosqldb/classes.distributedcoordinator.ts +7 -7
- package/ts/nosqldb/classes.doc.ts +594 -61
- package/ts/nosqldb/classes.easystore.ts +1 -1
- package/ts/nosqldb/classes.watcher.ts +1 -1
- package/ts/nosqldb/plugins.ts +0 -2
- package/ts/sqldb/clickhouse/smartclickhouse.classes.clickhousetable.ts +1 -1
- package/ts/sqldb/clickhouse/smartclickhouse.classes.smartclickhouse.ts +1 -1
- package/ts/sqldb/clickhouse/smartclickhouse.plugins.ts +1 -2
|
@@ -77,7 +77,7 @@ export class SmartdataDistributedCoordinator extends plugins.taskbuffer.distribu
|
|
|
77
77
|
private startHeartbeat = async () => {
|
|
78
78
|
while (this.ownInstance.data.status !== 'stopped') {
|
|
79
79
|
await this.sendHeartbeat();
|
|
80
|
-
await plugins.
|
|
80
|
+
await plugins.smartpromise.delayForRandom(5000, 10000);
|
|
81
81
|
}
|
|
82
82
|
};
|
|
83
83
|
|
|
@@ -179,7 +179,7 @@ export class SmartdataDistributedCoordinator extends plugins.taskbuffer.distribu
|
|
|
179
179
|
logger.log('info', 'bidding code stored.');
|
|
180
180
|
});
|
|
181
181
|
logger.log('info', `bidding for leadership...`);
|
|
182
|
-
await plugins.
|
|
182
|
+
await plugins.smartpromise.delayFor(plugins.smarttime.getMilliSecondsFromUnits({ seconds: 5 }));
|
|
183
183
|
await this.asyncExecutionStack.getExclusiveExecutionSlot(async () => {
|
|
184
184
|
let biddingInstances = await DistributedClass.getInstances({});
|
|
185
185
|
biddingInstances = biddingInstances.filter(
|
|
@@ -195,7 +195,7 @@ export class SmartdataDistributedCoordinator extends plugins.taskbuffer.distribu
|
|
|
195
195
|
this.ownInstance.data.elected = false;
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
|
-
await plugins.
|
|
198
|
+
await plugins.smartpromise.delayFor(5000);
|
|
199
199
|
logger.log('info', `settling with status elected = ${this.ownInstance.data.elected}`);
|
|
200
200
|
this.ownInstance.data.status = 'settled';
|
|
201
201
|
await this.ownInstance.save();
|
|
@@ -221,7 +221,7 @@ export class SmartdataDistributedCoordinator extends plugins.taskbuffer.distribu
|
|
|
221
221
|
* all instances that requested this task
|
|
222
222
|
*/
|
|
223
223
|
requestingDistibutedInstanceIds: string[];
|
|
224
|
-
responseTimeout: plugins.
|
|
224
|
+
responseTimeout: plugins.smartpromise.Timeout<any>;
|
|
225
225
|
}> = [];
|
|
226
226
|
|
|
227
227
|
this.distributedWatcher.changeSubject.subscribe({
|
|
@@ -243,7 +243,7 @@ export class SmartdataDistributedCoordinator extends plugins.taskbuffer.distribu
|
|
|
243
243
|
await instance.delete();
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
|
-
await plugins.
|
|
246
|
+
await plugins.smartpromise.delayFor(10000);
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
249
|
|
|
@@ -260,7 +260,7 @@ export class SmartdataDistributedCoordinator extends plugins.taskbuffer.distribu
|
|
|
260
260
|
this.ownInstance.data.taskRequests.push(taskRequestArg);
|
|
261
261
|
await this.ownInstance.save();
|
|
262
262
|
});
|
|
263
|
-
await plugins.
|
|
263
|
+
await plugins.smartpromise.delayFor(10000);
|
|
264
264
|
const result = await this.asyncExecutionStack.getExclusiveExecutionSlot(async () => {
|
|
265
265
|
await this.ownInstance.updateFromDb();
|
|
266
266
|
const taskRequestResult = this.ownInstance.data.taskRequestResults.find((resultItem) => {
|
|
@@ -291,7 +291,7 @@ export class SmartdataDistributedCoordinator extends plugins.taskbuffer.distribu
|
|
|
291
291
|
}
|
|
292
292
|
Object.assign(existingInfoBasis, infoBasisArg);
|
|
293
293
|
await this.ownInstance.save();
|
|
294
|
-
plugins.
|
|
294
|
+
plugins.smartpromise.delayFor(60000).then(() => {
|
|
295
295
|
this.asyncExecutionStack.getExclusiveExecutionSlot(async () => {
|
|
296
296
|
const indexToRemove = this.ownInstance.data.taskRequests.indexOf(existingInfoBasis);
|
|
297
297
|
if (indexToRemove >= 0) {
|