UNPKG

adonis5-queue

Version:

Adonis JS 5 queue package based backed by Kue and Kue-scheduler

29 lines (28 loc) 875 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const QueueManager_1 = __importDefault(require("../src/queue/QueueManager")); /** * Provider to bind redis to the container */ class QueueProvider { constructor(app) { this.app = app; } /** * Register the redis binding */ register() { this.app.container.singleton('Adonis5/Queue', () => { const queueConfig = this.app.container.use('Adonis/Core/Config').get('queue', {}); return new QueueManager_1.default(queueConfig, this.app.appRoot); }); } /** * Registering the health check checker with HealthCheck service */ boot() { } } exports.default = QueueProvider;