@pulsecron/nestjs-pulse
Version:
The modern MongoDB-powered scheduling library pulse for NestJS
14 lines • 656 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Define = Define;
const common_1 = require("@nestjs/common");
const constants_1 = require("../constants");
const enums_1 = require("../enums");
function Define(nameOrOptions) {
let options = {};
if (nameOrOptions) {
options = typeof nameOrOptions === 'string' ? { name: nameOrOptions } : nameOrOptions;
}
return (0, common_1.applyDecorators)((0, common_1.SetMetadata)(constants_1.PULSE_JOB_OPTIONS, options), (0, common_1.SetMetadata)(constants_1.JOB_PROCESSOR_TYPE, enums_1.JobProcessorType.DEFINE));
}
//# sourceMappingURL=define.decorator.js.map