wsp-ms-core 1.0.97 → 1.0.98
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 +10 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1977,7 +1977,16 @@ var DefaultMysqlInboxProcessor = class {
|
|
|
1977
1977
|
const records = await repository.listPending(20);
|
|
1978
1978
|
for (let record of records) {
|
|
1979
1979
|
if (this.handlers.has(record.topic)) {
|
|
1980
|
-
|
|
1980
|
+
try {
|
|
1981
|
+
record.markProcessing();
|
|
1982
|
+
await repository.update(record);
|
|
1983
|
+
await this.handlers.get(record.topic)(record);
|
|
1984
|
+
record.markProcessed();
|
|
1985
|
+
} catch (error) {
|
|
1986
|
+
record.markWithError(error.toString());
|
|
1987
|
+
} finally {
|
|
1988
|
+
await repository.update(record);
|
|
1989
|
+
}
|
|
1981
1990
|
}
|
|
1982
1991
|
}
|
|
1983
1992
|
});
|