@nxtedition/lib 13.1.0 → 13.2.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/app.js +51 -47
- package/package.json +2 -1
- package/util/template/javascript.js +1 -0
package/app.js
CHANGED
|
@@ -492,6 +492,53 @@ module.exports = function (appConfig, onTerminate) {
|
|
|
492
492
|
.timer(0, 10e3)
|
|
493
493
|
.pipe(
|
|
494
494
|
rx.exhaustMap(async () => {
|
|
495
|
+
const messages = []
|
|
496
|
+
|
|
497
|
+
if (ds.stats.record.records > 100e3) {
|
|
498
|
+
messages.push({
|
|
499
|
+
id: 'app:ds_record_records',
|
|
500
|
+
level: 40,
|
|
501
|
+
code: 'NXT_DEEPSTREAM_RECORDS_RECORDS',
|
|
502
|
+
msg: 'ds: ' + ds.stats.record.records + ' records',
|
|
503
|
+
})
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
if (ds.stats.record.pruning > 100e3) {
|
|
507
|
+
messages.push({
|
|
508
|
+
id: 'app:ds_record_pruning',
|
|
509
|
+
level: 40,
|
|
510
|
+
code: 'NXT_DEEPSTREAM_RECORDS_PRUNING',
|
|
511
|
+
msg: 'ds: ' + ds.stats.record.pruning + ' pruning',
|
|
512
|
+
})
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
if (ds.stats.record.pending > 10e3) {
|
|
516
|
+
messages.push({
|
|
517
|
+
id: 'app:ds_record_pending',
|
|
518
|
+
level: 40,
|
|
519
|
+
code: 'NXT_DEEPSTREAM_RECORDS_PENDING',
|
|
520
|
+
msg: 'ds: ' + ds.stats.record.pending + ' pending',
|
|
521
|
+
})
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
if (ds.stats.record.updating > 10e3) {
|
|
525
|
+
messages.push({
|
|
526
|
+
id: 'app:ds_record_updating',
|
|
527
|
+
level: 40,
|
|
528
|
+
code: 'NXT_DEEPSTREAM_RECORDS_UPDATING',
|
|
529
|
+
msg: 'ds: ' + ds.stats.record.updating + ' updating',
|
|
530
|
+
})
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
if (ds.stats.record.patching > 10e3) {
|
|
534
|
+
messages.push({
|
|
535
|
+
id: 'app:ds_record_patching',
|
|
536
|
+
level: 40,
|
|
537
|
+
code: 'NXT_DEEPSTREAM_RECORDS_PATCHING',
|
|
538
|
+
msg: 'ds: ' + ds.stats.record.patching + ' patching',
|
|
539
|
+
})
|
|
540
|
+
}
|
|
541
|
+
|
|
495
542
|
try {
|
|
496
543
|
const { body } = await client.request({
|
|
497
544
|
method: 'GET',
|
|
@@ -506,14 +553,16 @@ module.exports = function (appConfig, onTerminate) {
|
|
|
506
553
|
})
|
|
507
554
|
await body.dump()
|
|
508
555
|
} catch (err) {
|
|
509
|
-
|
|
556
|
+
messages.push({
|
|
510
557
|
id: 'app:ds_http_connection',
|
|
511
558
|
level: 40,
|
|
512
559
|
code: err.code,
|
|
513
560
|
msg: 'ds: ' + err.message,
|
|
514
|
-
}
|
|
561
|
+
})
|
|
515
562
|
}
|
|
516
563
|
}
|
|
564
|
+
|
|
565
|
+
return messages
|
|
517
566
|
})
|
|
518
567
|
)
|
|
519
568
|
.subscribe(o)
|
|
@@ -562,51 +611,6 @@ module.exports = function (appConfig, onTerminate) {
|
|
|
562
611
|
}
|
|
563
612
|
)
|
|
564
613
|
|
|
565
|
-
if (ds && ds.stats.record.records > 100e3) {
|
|
566
|
-
messages.push({
|
|
567
|
-
id: 'app:ds',
|
|
568
|
-
level: 40,
|
|
569
|
-
code: 'NXT_DS_RECORDS',
|
|
570
|
-
msg: 'ds: ' + ds.stats.record.records + ' records',
|
|
571
|
-
})
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
if (ds && ds.stats.record.pruning > 100e3) {
|
|
575
|
-
messages.push({
|
|
576
|
-
id: 'app:ds',
|
|
577
|
-
level: 40,
|
|
578
|
-
code: 'NXT_DS_PRUNING',
|
|
579
|
-
msg: 'ds: ' + ds.stats.record.pruning + ' pruning',
|
|
580
|
-
})
|
|
581
|
-
}
|
|
582
|
-
|
|
583
|
-
if (ds && ds.stats.record.pending > 10e3) {
|
|
584
|
-
messages.push({
|
|
585
|
-
id: 'app:ds',
|
|
586
|
-
level: 40,
|
|
587
|
-
code: 'NXT_DS_PENDING',
|
|
588
|
-
msg: 'ds: ' + ds.stats.record.pending + ' pending',
|
|
589
|
-
})
|
|
590
|
-
}
|
|
591
|
-
|
|
592
|
-
if (ds && ds.stats.record.updating > 10e3) {
|
|
593
|
-
messages.push({
|
|
594
|
-
id: 'app:ds',
|
|
595
|
-
level: 40,
|
|
596
|
-
code: 'NXT_DS_UPDATING',
|
|
597
|
-
msg: 'ds: ' + ds.stats.record.updating + ' updating',
|
|
598
|
-
})
|
|
599
|
-
}
|
|
600
|
-
|
|
601
|
-
if (ds && ds.stats.record.patching > 10e3) {
|
|
602
|
-
messages.push({
|
|
603
|
-
id: 'app:ds',
|
|
604
|
-
level: 40,
|
|
605
|
-
code: 'NXT_DS_PATCHING',
|
|
606
|
-
msg: 'ds: ' + ds.stats.record.patching + ' patching',
|
|
607
|
-
})
|
|
608
|
-
}
|
|
609
|
-
|
|
610
614
|
return { ...status, messages, timestamp: Date.now() }
|
|
611
615
|
}),
|
|
612
616
|
rx.catchError((err) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nxtedition/lib",
|
|
3
|
-
"version": "13.1
|
|
3
|
+
"version": "13.2.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Robert Nagy <robert.nagy@boffins.se>",
|
|
6
6
|
"files": [
|
|
@@ -83,6 +83,7 @@
|
|
|
83
83
|
"object-hash": "^3.0.0",
|
|
84
84
|
"qs": "^6.11.1",
|
|
85
85
|
"request-target": "^1.0.2",
|
|
86
|
+
"smpte-timecode": "^1.3.3",
|
|
86
87
|
"split-string": "^6.0.0",
|
|
87
88
|
"toobusy-js": "^0.5.1",
|
|
88
89
|
"undici": "^5.22.0",
|