@webda/async 2.4.1 → 2.4.3
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.
|
@@ -13,11 +13,14 @@ export class ActionMemoryLogger extends MemoryLogger {
|
|
|
13
13
|
onMessage(msg) {
|
|
14
14
|
super.onMessage(msg);
|
|
15
15
|
if (!this.timeout) {
|
|
16
|
-
setTimeout(() => this.save(), this.logSaveDelay);
|
|
16
|
+
this.timeout = setTimeout(() => this.save(), this.logSaveDelay);
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
save() {
|
|
20
|
-
this.timeout
|
|
20
|
+
if (this.timeout) {
|
|
21
|
+
clearTimeout(this.timeout);
|
|
22
|
+
this.timeout = undefined;
|
|
23
|
+
}
|
|
21
24
|
return this.action.patch({ logs: this.getLogs().map(msg => ConsoleLogger.format(msg, this.format)) }, null);
|
|
22
25
|
}
|
|
23
26
|
async saveAndClose() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"servicerunner.js","sourceRoot":"","sources":["../../src/services/servicerunner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAA+C,MAAM,gBAAgB,CAAC;AAG1G,OAAO,EAAa,MAAM,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAkB/D;;GAEG;AACH,MAAM,OAAO,kBAAmB,SAAQ,YAAY;IAGlD,YACE,MAAoB,EACpB,KAAqB,EACrB,KAAa,EACH,MAAmB,EACtB,YAAoB,EACpB,MAAe;QAEtB,KAAK,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;QAJlB,WAAM,GAAN,MAAM,CAAa;QACtB,iBAAY,GAAZ,YAAY,CAAQ;QACpB,WAAM,GAAN,MAAM,CAAS;IAGxB,CAAC;IAED,SAAS,CAAC,GAAkB;QAC1B,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;QACrB,IAAI,CAAC,IAAI,CAAC,OAA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CAAC;aAC5D;QACH,CAAC,CAAC,CAA0C,MAAM,CAAC,CAAC;QAEpD,OAAO;YACL,KAAK,EAAE,MAAM,CAAC,YAAY,EAAE;YAC5B,OAAO;SACR,CAAC;IACJ,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webda/async",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.3",
|
|
4
4
|
"description": "Async System",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"package.json"
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@webda/core": "^2.4.
|
|
23
|
+
"@webda/core": "^2.4.3",
|
|
24
24
|
"axios": "^1.1.3"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"engines": {
|
|
63
63
|
"node": ">=14.6.0"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "ff8b13e7deabe1b3d439aec790a80c82ea1289d8"
|
|
66
66
|
}
|
package/webda.module.json
CHANGED
|
@@ -373,6 +373,47 @@
|
|
|
373
373
|
},
|
|
374
374
|
"title": "AsyncOperationAction"
|
|
375
375
|
},
|
|
376
|
+
"webda/servicerunner": {
|
|
377
|
+
"type": "object",
|
|
378
|
+
"properties": {
|
|
379
|
+
"type": {
|
|
380
|
+
"type": "string",
|
|
381
|
+
"description": "Type of the service"
|
|
382
|
+
},
|
|
383
|
+
"url": {
|
|
384
|
+
"type": "string",
|
|
385
|
+
"description": "URL on which to serve the content"
|
|
386
|
+
},
|
|
387
|
+
"actions": {
|
|
388
|
+
"type": "array",
|
|
389
|
+
"items": {
|
|
390
|
+
"type": "string"
|
|
391
|
+
},
|
|
392
|
+
"description": "Actions managed by the runner",
|
|
393
|
+
"default": []
|
|
394
|
+
},
|
|
395
|
+
"logFormat": {
|
|
396
|
+
"type": "string",
|
|
397
|
+
"description": "Define the log format",
|
|
398
|
+
"default": "ConsoleLoggerDefaultFormat"
|
|
399
|
+
},
|
|
400
|
+
"logSaveDelay": {
|
|
401
|
+
"type": "number",
|
|
402
|
+
"description": "How long before saving logs (in ms)",
|
|
403
|
+
"default": 5000
|
|
404
|
+
},
|
|
405
|
+
"openapi": {
|
|
406
|
+
"type": "object",
|
|
407
|
+
"additionalProperties": true
|
|
408
|
+
}
|
|
409
|
+
},
|
|
410
|
+
"required": [
|
|
411
|
+
"type"
|
|
412
|
+
],
|
|
413
|
+
"description": "Add the log format to capture",
|
|
414
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
415
|
+
"title": "ServiceRunner"
|
|
416
|
+
},
|
|
376
417
|
"webda/asyncjobservice": {
|
|
377
418
|
"type": "object",
|
|
378
419
|
"properties": {
|
|
@@ -613,47 +654,6 @@
|
|
|
613
654
|
}
|
|
614
655
|
},
|
|
615
656
|
"title": "LocalRunner"
|
|
616
|
-
},
|
|
617
|
-
"webda/servicerunner": {
|
|
618
|
-
"type": "object",
|
|
619
|
-
"properties": {
|
|
620
|
-
"type": {
|
|
621
|
-
"type": "string",
|
|
622
|
-
"description": "Type of the service"
|
|
623
|
-
},
|
|
624
|
-
"url": {
|
|
625
|
-
"type": "string",
|
|
626
|
-
"description": "URL on which to serve the content"
|
|
627
|
-
},
|
|
628
|
-
"actions": {
|
|
629
|
-
"type": "array",
|
|
630
|
-
"items": {
|
|
631
|
-
"type": "string"
|
|
632
|
-
},
|
|
633
|
-
"description": "Actions managed by the runner",
|
|
634
|
-
"default": []
|
|
635
|
-
},
|
|
636
|
-
"logFormat": {
|
|
637
|
-
"type": "string",
|
|
638
|
-
"description": "Define the log format",
|
|
639
|
-
"default": "ConsoleLoggerDefaultFormat"
|
|
640
|
-
},
|
|
641
|
-
"logSaveDelay": {
|
|
642
|
-
"type": "number",
|
|
643
|
-
"description": "How long before saving logs (in ms)",
|
|
644
|
-
"default": 5000
|
|
645
|
-
},
|
|
646
|
-
"openapi": {
|
|
647
|
-
"type": "object",
|
|
648
|
-
"additionalProperties": true
|
|
649
|
-
}
|
|
650
|
-
},
|
|
651
|
-
"required": [
|
|
652
|
-
"type"
|
|
653
|
-
],
|
|
654
|
-
"description": "Add the log format to capture",
|
|
655
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
656
|
-
"title": "ServiceRunner"
|
|
657
657
|
}
|
|
658
658
|
}
|
|
659
659
|
}
|