"use strict";
exports.id = 947;
exports.ids = [947];
exports.modules = {

/***/ 4276:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "_": () => (/* binding */ getCollection),
/* harmony export */   "z": () => (/* binding */ getDb)
/* harmony export */ });
/* harmony import */ var lokijs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9460);
/* harmony import */ var lokijs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lokijs__WEBPACK_IMPORTED_MODULE_0__);

const LokiMemoryAdapter = (lokijs__WEBPACK_IMPORTED_MODULE_0___default().LokiMemoryAdapter);
const getDb = ()=>{
    if (!globalThis.memoryCache["db"]) {
        const db = new (lokijs__WEBPACK_IMPORTED_MODULE_0___default())("docmq", {
            adapter: new LokiMemoryAdapter({
                asyncResponses: true
            })
        });
        db.addCollection("tds-jobs", {
            unique: [
                "id"
            ],
            asyncListeners: true,
            clone: true
        });
        db.addCollection("tds-runs", {
            asyncListeners: true,
            clone: true
        });
        globalThis.memoryCache["db"] = db;
    }
    return globalThis.memoryCache["db"];
};
const getCollection = (name)=>{
    const db = getDb();
    return db.getCollection(name);
};


/***/ }),

/***/ 7947:
/***/ ((module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "O": () => (/* binding */ WorkerRequestError),
/* harmony export */   "w": () => (/* binding */ getQueue)
/* harmony export */ });
/* harmony import */ var docmq__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3906);
/* harmony import */ var _loki__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4276);
var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([docmq__WEBPACK_IMPORTED_MODULE_0__]);
docmq__WEBPACK_IMPORTED_MODULE_0__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];


class WorkerRequestError extends Error {
}
const getQueue = async ()=>{
    const db = (0,_loki__WEBPACK_IMPORTED_MODULE_1__/* .getDb */ .z)();
    if (!globalThis.memoryCache["mq"]) {
        globalThis.memoryCache["mq"] = new docmq__WEBPACK_IMPORTED_MODULE_0__.MemoryDriver(db);
    }
    const q = new docmq__WEBPACK_IMPORTED_MODULE_0__.Queue(globalThis.memoryCache["mq"], "dev", {
        statInterval: 15
    });
    return Promise.resolve(q);
};

__webpack_async_result__();
} catch(e) { __webpack_async_result__(e); } });

/***/ })

};
;