magmastream 2.9.2-dev.8 → 2.9.2-dev.9
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/statestorage/JsonQueue.js +21 -17
- package/package.json +1 -1
|
@@ -524,15 +524,17 @@ class JsonQueue {
|
|
|
524
524
|
await fs_1.promises.unlink(filePath);
|
|
525
525
|
}
|
|
526
526
|
catch (err) {
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
527
|
+
if (err.code !== "ENOENT") {
|
|
528
|
+
const error = err instanceof MagmastreamError_1.MagmaStreamError
|
|
529
|
+
? err
|
|
530
|
+
: new MagmastreamError_1.MagmaStreamError({
|
|
531
|
+
code: Enums_1.MagmaStreamErrorCode.QUEUE_JSON_ERROR,
|
|
532
|
+
message: `Failed to delete file: ${filePath}`,
|
|
533
|
+
cause: err,
|
|
534
|
+
});
|
|
535
|
+
console.error(error);
|
|
536
|
+
this.manager.emit(Enums_1.ManagerEventTypes.Debug, `[JSONQUEUE] Failed to delete file: ${filePath}`);
|
|
537
|
+
}
|
|
536
538
|
}
|
|
537
539
|
}
|
|
538
540
|
/**
|
|
@@ -570,14 +572,16 @@ class JsonQueue {
|
|
|
570
572
|
return JSON.parse(raw);
|
|
571
573
|
}
|
|
572
574
|
catch (err) {
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
575
|
+
if (err.code !== "ENOENT") {
|
|
576
|
+
const error = err instanceof MagmastreamError_1.MagmaStreamError
|
|
577
|
+
? err
|
|
578
|
+
: new MagmastreamError_1.MagmaStreamError({
|
|
579
|
+
code: Enums_1.MagmaStreamErrorCode.QUEUE_JSON_ERROR,
|
|
580
|
+
message: `Failed to read file: ${filePath}`,
|
|
581
|
+
cause: err,
|
|
582
|
+
});
|
|
583
|
+
console.error(error);
|
|
584
|
+
}
|
|
581
585
|
return null;
|
|
582
586
|
}
|
|
583
587
|
}
|