Review funkt
This commit is contained in:
28
node_modules/bullmq/dist/cjs/classes/errors/connection-closed-error.js
generated
vendored
Normal file
28
node_modules/bullmq/dist/cjs/classes/errors/connection-closed-error.js
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ConnectionClosedError = exports.CONNECTION_CLOSED_ERROR_MSG = void 0;
|
||||
/**
|
||||
* Error message used when a connection is closed.
|
||||
*
|
||||
* This mirrors the constant exported by ioredis (`ioredis/built/utils`) but is
|
||||
* defined locally so that BullMQ can be used without ioredis installed (for
|
||||
* example, when using the PostgreSQL backend).
|
||||
*/
|
||||
exports.CONNECTION_CLOSED_ERROR_MSG = 'Connection is closed.';
|
||||
/**
|
||||
* Thrown by any BullMQ Redis adapter (ioredis, node-redis, Bun, …) when a
|
||||
* command fails because the connection is already closed or was closed
|
||||
* mid-flight.
|
||||
*
|
||||
* Using a single well-known class lets {@link isNotConnectionError} do a
|
||||
* structural `instanceof` check rather than fragile message-substring matching.
|
||||
*/
|
||||
class ConnectionClosedError extends Error {
|
||||
constructor(message, cause) {
|
||||
super(message !== null && message !== void 0 ? message : exports.CONNECTION_CLOSED_ERROR_MSG);
|
||||
this.cause = cause;
|
||||
this.name = 'ConnectionClosedError';
|
||||
Object.setPrototypeOf(this, new.target.prototype);
|
||||
}
|
||||
}
|
||||
exports.ConnectionClosedError = ConnectionClosedError;
|
||||
19
node_modules/bullmq/dist/cjs/classes/errors/delayed-error.js
generated
vendored
Normal file
19
node_modules/bullmq/dist/cjs/classes/errors/delayed-error.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.DelayedError = exports.DELAYED_ERROR = void 0;
|
||||
exports.DELAYED_ERROR = 'bullmq:movedToDelayed';
|
||||
/**
|
||||
* DelayedError
|
||||
*
|
||||
* Error to be thrown when job is moved to delayed state
|
||||
* from job in active state.
|
||||
*
|
||||
*/
|
||||
class DelayedError extends Error {
|
||||
constructor(message = exports.DELAYED_ERROR) {
|
||||
super(message);
|
||||
this.name = this.constructor.name;
|
||||
Object.setPrototypeOf(this, new.target.prototype);
|
||||
}
|
||||
}
|
||||
exports.DelayedError = DelayedError;
|
||||
9
node_modules/bullmq/dist/cjs/classes/errors/index.js
generated
vendored
Normal file
9
node_modules/bullmq/dist/cjs/classes/errors/index.js
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const tslib_1 = require("tslib");
|
||||
tslib_1.__exportStar(require("./connection-closed-error"), exports);
|
||||
tslib_1.__exportStar(require("./delayed-error"), exports);
|
||||
tslib_1.__exportStar(require("./rate-limit-error"), exports);
|
||||
tslib_1.__exportStar(require("./unrecoverable-error"), exports);
|
||||
tslib_1.__exportStar(require("./waiting-children-error"), exports);
|
||||
tslib_1.__exportStar(require("./waiting-error"), exports);
|
||||
18
node_modules/bullmq/dist/cjs/classes/errors/rate-limit-error.js
generated
vendored
Normal file
18
node_modules/bullmq/dist/cjs/classes/errors/rate-limit-error.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.RateLimitError = exports.RATE_LIMIT_ERROR = void 0;
|
||||
exports.RATE_LIMIT_ERROR = 'bullmq:rateLimitExceeded';
|
||||
/**
|
||||
* RateLimitError
|
||||
*
|
||||
* Error to be thrown when queue reaches a rate limit.
|
||||
*
|
||||
*/
|
||||
class RateLimitError extends Error {
|
||||
constructor(message = exports.RATE_LIMIT_ERROR) {
|
||||
super(message);
|
||||
this.name = this.constructor.name;
|
||||
Object.setPrototypeOf(this, new.target.prototype);
|
||||
}
|
||||
}
|
||||
exports.RateLimitError = RateLimitError;
|
||||
19
node_modules/bullmq/dist/cjs/classes/errors/unrecoverable-error.js
generated
vendored
Normal file
19
node_modules/bullmq/dist/cjs/classes/errors/unrecoverable-error.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.UnrecoverableError = exports.UNRECOVERABLE_ERROR = void 0;
|
||||
exports.UNRECOVERABLE_ERROR = 'bullmq:unrecoverable';
|
||||
/**
|
||||
* UnrecoverableError
|
||||
*
|
||||
* Error to move a job to failed even if the attemptsMade
|
||||
* are lower than the expected limit.
|
||||
*
|
||||
*/
|
||||
class UnrecoverableError extends Error {
|
||||
constructor(message = exports.UNRECOVERABLE_ERROR) {
|
||||
super(message);
|
||||
this.name = this.constructor.name;
|
||||
Object.setPrototypeOf(this, new.target.prototype);
|
||||
}
|
||||
}
|
||||
exports.UnrecoverableError = UnrecoverableError;
|
||||
19
node_modules/bullmq/dist/cjs/classes/errors/waiting-children-error.js
generated
vendored
Normal file
19
node_modules/bullmq/dist/cjs/classes/errors/waiting-children-error.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.WaitingChildrenError = exports.WAITING_CHILDREN_ERROR = void 0;
|
||||
exports.WAITING_CHILDREN_ERROR = 'bullmq:movedToWaitingChildren';
|
||||
/**
|
||||
* WaitingChildrenError
|
||||
*
|
||||
* Error to be thrown when job is moved to waiting-children state
|
||||
* from job in active state.
|
||||
*
|
||||
*/
|
||||
class WaitingChildrenError extends Error {
|
||||
constructor(message = exports.WAITING_CHILDREN_ERROR) {
|
||||
super(message);
|
||||
this.name = this.constructor.name;
|
||||
Object.setPrototypeOf(this, new.target.prototype);
|
||||
}
|
||||
}
|
||||
exports.WaitingChildrenError = WaitingChildrenError;
|
||||
18
node_modules/bullmq/dist/cjs/classes/errors/waiting-error.js
generated
vendored
Normal file
18
node_modules/bullmq/dist/cjs/classes/errors/waiting-error.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.WaitingError = exports.WAITING_ERROR = void 0;
|
||||
exports.WAITING_ERROR = 'bullmq:movedToWait';
|
||||
/**
|
||||
* WaitingError
|
||||
*
|
||||
* Error to be thrown when job is moved to wait or prioritized state
|
||||
* from job in active state.
|
||||
*/
|
||||
class WaitingError extends Error {
|
||||
constructor(message = exports.WAITING_ERROR) {
|
||||
super(message);
|
||||
this.name = this.constructor.name;
|
||||
Object.setPrototypeOf(this, new.target.prototype);
|
||||
}
|
||||
}
|
||||
exports.WaitingError = WaitingError;
|
||||
Reference in New Issue
Block a user