wsp-ms-core 1.0.87-beta-1.0 → 1.0.87-beta-1.2
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/index.cjs +2 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +0 -3
- package/dist/index.d.ts +0 -3
- package/dist/index.js +2 -12
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -646,10 +646,7 @@ declare class DefaultMysqlInboxRunner {
|
|
|
646
646
|
private readonly interval;
|
|
647
647
|
private readonly maxEvents;
|
|
648
648
|
private topics;
|
|
649
|
-
private errors;
|
|
650
649
|
constructor(uowFactory: BasicUnitOfWorkFactory, eventManager: EventManager);
|
|
651
|
-
private addError;
|
|
652
|
-
private logErrors;
|
|
653
650
|
private saveEvent;
|
|
654
651
|
subscribeTo(topic: string): void;
|
|
655
652
|
process(): Promise<void>;
|
package/dist/index.d.ts
CHANGED
|
@@ -646,10 +646,7 @@ declare class DefaultMysqlInboxRunner {
|
|
|
646
646
|
private readonly interval;
|
|
647
647
|
private readonly maxEvents;
|
|
648
648
|
private topics;
|
|
649
|
-
private errors;
|
|
650
649
|
constructor(uowFactory: BasicUnitOfWorkFactory, eventManager: EventManager);
|
|
651
|
-
private addError;
|
|
652
|
-
private logErrors;
|
|
653
650
|
private saveEvent;
|
|
654
651
|
subscribeTo(topic: string): void;
|
|
655
652
|
process(): Promise<void>;
|
package/dist/index.js
CHANGED
|
@@ -1837,21 +1837,11 @@ var InboxMysqlRepository = class {
|
|
|
1837
1837
|
var DefaultMysqlInboxRunner = class {
|
|
1838
1838
|
constructor(uowFactory, eventManager) {
|
|
1839
1839
|
this.topics = [];
|
|
1840
|
-
this.errors = [];
|
|
1841
1840
|
this.uowFactory = uowFactory;
|
|
1842
1841
|
this.eventManager = eventManager;
|
|
1843
1842
|
this.interval = Number(process.env.OUTBOX_RUNNER_INTERVAL_MS || 5e3);
|
|
1844
1843
|
this.maxEvents = Number(process.env.OUTBOX_RUNNER_MAX_EVENTS || 20);
|
|
1845
1844
|
}
|
|
1846
|
-
addError(error) {
|
|
1847
|
-
this.errors.push(error);
|
|
1848
|
-
}
|
|
1849
|
-
logErrors() {
|
|
1850
|
-
if (this.errors.length > 0) {
|
|
1851
|
-
console.error(this.errors);
|
|
1852
|
-
this.errors = [];
|
|
1853
|
-
}
|
|
1854
|
-
}
|
|
1855
1845
|
async saveEvent(e, repository) {
|
|
1856
1846
|
let record = new InboxRecord(
|
|
1857
1847
|
UUID.create(),
|
|
@@ -1884,13 +1874,13 @@ var DefaultMysqlInboxRunner = class {
|
|
|
1884
1874
|
await this.saveEvent(e, inboxRepository);
|
|
1885
1875
|
});
|
|
1886
1876
|
} catch (error) {
|
|
1887
|
-
|
|
1877
|
+
console.log(error.toString());
|
|
1888
1878
|
}
|
|
1889
1879
|
}
|
|
1890
1880
|
});
|
|
1891
1881
|
}
|
|
1892
1882
|
async start() {
|
|
1893
|
-
console.log("[
|
|
1883
|
+
console.log("[inbox-runner]: start");
|
|
1894
1884
|
for (; ; ) {
|
|
1895
1885
|
await this.process();
|
|
1896
1886
|
}
|