@tachybase/plugin-adapter-bullmq 0.23.8
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/.turbo/turbo-build.log +3 -0
- package/README.md +1 -0
- package/client.d.ts +2 -0
- package/client.js +1 -0
- package/dist/client/index.d.ts +4 -0
- package/dist/client/index.js +1 -0
- package/dist/externalVersion.js +4 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +39 -0
- package/dist/node_modules/@bull-board/api/bullAdapter.d.ts +1 -0
- package/dist/node_modules/@bull-board/api/bullAdapter.js +1 -0
- package/dist/node_modules/@bull-board/api/bullMQAdapter.d.ts +1 -0
- package/dist/node_modules/@bull-board/api/bullMQAdapter.js +1 -0
- package/dist/node_modules/@bull-board/api/dist/src/constants/statuses.d.ts +11 -0
- package/dist/node_modules/@bull-board/api/dist/src/constants/statuses.js +15 -0
- package/dist/node_modules/@bull-board/api/dist/src/handlers/addJob.d.ts +2 -0
- package/dist/node_modules/@bull-board/api/dist/src/handlers/addJob.js +18 -0
- package/dist/node_modules/@bull-board/api/dist/src/handlers/cleanAll.d.ts +2 -0
- package/dist/node_modules/@bull-board/api/dist/src/handlers/cleanAll.js +15 -0
- package/dist/node_modules/@bull-board/api/dist/src/handlers/cleanJob.d.ts +2 -0
- package/dist/node_modules/@bull-board/api/dist/src/handlers/cleanJob.js +14 -0
- package/dist/node_modules/@bull-board/api/dist/src/handlers/emptyQueue.d.ts +2 -0
- package/dist/node_modules/@bull-board/api/dist/src/handlers/emptyQueue.js +10 -0
- package/dist/node_modules/@bull-board/api/dist/src/handlers/entryPoint.d.ts +5 -0
- package/dist/node_modules/@bull-board/api/dist/src/handlers/entryPoint.js +21 -0
- package/dist/node_modules/@bull-board/api/dist/src/handlers/error.d.ts +2 -0
- package/dist/node_modules/@bull-board/api/dist/src/handlers/error.js +14 -0
- package/dist/node_modules/@bull-board/api/dist/src/handlers/job.d.ts +2 -0
- package/dist/node_modules/@bull-board/api/dist/src/handlers/job.js +20 -0
- package/dist/node_modules/@bull-board/api/dist/src/handlers/jobLogs.d.ts +2 -0
- package/dist/node_modules/@bull-board/api/dist/src/handlers/jobLogs.js +16 -0
- package/dist/node_modules/@bull-board/api/dist/src/handlers/pauseQueue.d.ts +2 -0
- package/dist/node_modules/@bull-board/api/dist/src/handlers/pauseQueue.js +10 -0
- package/dist/node_modules/@bull-board/api/dist/src/handlers/promotJob.d.ts +2 -0
- package/dist/node_modules/@bull-board/api/dist/src/handlers/promotJob.js +14 -0
- package/dist/node_modules/@bull-board/api/dist/src/handlers/promoteAll.d.ts +2 -0
- package/dist/node_modules/@bull-board/api/dist/src/handlers/promoteAll.js +10 -0
- package/dist/node_modules/@bull-board/api/dist/src/handlers/queues.d.ts +4 -0
- package/dist/node_modules/@bull-board/api/dist/src/handlers/queues.js +76 -0
- package/dist/node_modules/@bull-board/api/dist/src/handlers/redisStats.d.ts +2 -0
- package/dist/node_modules/@bull-board/api/dist/src/handlers/redisStats.js +33 -0
- package/dist/node_modules/@bull-board/api/dist/src/handlers/resumeQueue.d.ts +2 -0
- package/dist/node_modules/@bull-board/api/dist/src/handlers/resumeQueue.js +10 -0
- package/dist/node_modules/@bull-board/api/dist/src/handlers/retryAll.d.ts +2 -0
- package/dist/node_modules/@bull-board/api/dist/src/handlers/retryAll.js +12 -0
- package/dist/node_modules/@bull-board/api/dist/src/handlers/retryJob.d.ts +2 -0
- package/dist/node_modules/@bull-board/api/dist/src/handlers/retryJob.js +15 -0
- package/dist/node_modules/@bull-board/api/dist/src/handlers/updateJobData.d.ts +2 -0
- package/dist/node_modules/@bull-board/api/dist/src/handlers/updateJobData.js +20 -0
- package/dist/node_modules/@bull-board/api/dist/src/index.d.ts +12 -0
- package/dist/node_modules/@bull-board/api/dist/src/index.js +1 -0
- package/dist/node_modules/@bull-board/api/dist/src/providers/job.d.ts +3 -0
- package/dist/node_modules/@bull-board/api/dist/src/providers/job.js +19 -0
- package/dist/node_modules/@bull-board/api/dist/src/providers/queue.d.ts +5 -0
- package/dist/node_modules/@bull-board/api/dist/src/providers/queue.js +20 -0
- package/dist/node_modules/@bull-board/api/dist/src/queueAdapters/base.d.ts +31 -0
- package/dist/node_modules/@bull-board/api/dist/src/queueAdapters/base.js +27 -0
- package/dist/node_modules/@bull-board/api/dist/src/queueAdapters/bull.d.ts +23 -0
- package/dist/node_modules/@bull-board/api/dist/src/queueAdapters/bull.js +87 -0
- package/dist/node_modules/@bull-board/api/dist/src/queueAdapters/bullMQ.d.ts +22 -0
- package/dist/node_modules/@bull-board/api/dist/src/queueAdapters/bullMQ.js +91 -0
- package/dist/node_modules/@bull-board/api/dist/src/queuesApi.d.ts +9 -0
- package/dist/node_modules/@bull-board/api/dist/src/queuesApi.js +32 -0
- package/dist/node_modules/@bull-board/api/dist/src/routes.d.ts +2 -0
- package/dist/node_modules/@bull-board/api/dist/src/routes.js +96 -0
- package/dist/node_modules/@bull-board/api/dist/typings/app.d.ts +203 -0
- package/dist/node_modules/@bull-board/api/dist/typings/app.js +3 -0
- package/dist/node_modules/@bull-board/api/dist/typings/responses.d.ts +8 -0
- package/dist/node_modules/@bull-board/api/dist/typings/responses.js +3 -0
- package/dist/node_modules/@bull-board/api/dist/typings/utils.d.ts +1 -0
- package/dist/node_modules/@bull-board/api/dist/typings/utils.js +3 -0
- package/dist/node_modules/@bull-board/api/package.json +1 -0
- package/dist/node_modules/@bull-board/koa/dist/KoaAdapter.d.ts +23 -0
- package/dist/node_modules/@bull-board/koa/dist/KoaAdapter.js +125 -0
- package/dist/node_modules/@bull-board/koa/dist/index.d.ts +1 -0
- package/dist/node_modules/@bull-board/koa/dist/index.js +415 -0
- package/dist/node_modules/@bull-board/koa/node_modules/.bin/ejs +17 -0
- package/dist/node_modules/@bull-board/koa/package.json +1 -0
- package/dist/node_modules/bullmq/LICENSE +21 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/async-fifo-queue.js +129 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/backoffs.js +48 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/child-pool.js +71 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/child-processor.js +154 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/child.js +210 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/errors/delayed-error.js +20 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/errors/index.js +8 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/errors/rate-limit-error.js +19 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/errors/unrecoverable-error.js +20 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/errors/waiting-children-error.js +20 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/flow-producer.js +339 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/index.js +25 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/job-scheduler.js +221 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/job.js +893 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/main-base.js +44 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/main-worker.d.ts +1 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/main-worker.js +10 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/main.d.ts +1 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/main.js +10 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/queue-base.js +155 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/queue-events-producer.js +42 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/queue-events.js +125 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/queue-getters.js +450 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/queue-keys.js +43 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/queue.js +635 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/redis-connection.js +270 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/repeat.js +204 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/sandbox.js +75 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/scripts.js +1035 -0
- package/dist/node_modules/bullmq/dist/cjs/classes/worker.js +819 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/addDelayedJob-6.lua +119 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/addJobScheduler-2.lua +91 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/addLog-2.lua +30 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/addParentJob-4.lua +104 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/addPrioritizedJob-8.lua +117 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/addRepeatableJob-2.lua +84 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/addStandardJob-8.lua +122 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/changeDelay-4.lua +55 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/changePriority-7.lua +68 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/cleanJobsInSet-3.lua +55 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/drain-5.lua +41 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/extendLock-2.lua +23 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/extendLocks-1.lua +44 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/getCounts-1.lua +36 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/getCountsPerPriority-4.lua +35 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/getJobScheduler-1.lua +19 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/getRanges-1.lua +70 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/getRateLimitTtl-1.lua +20 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/getState-8.lua +65 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/getStateV2-8.lua +58 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/addBaseMarkerIfNeeded.lua +9 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/addDelayMarkerIfNeeded.lua +15 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/addJobInTargetList.lua +11 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/addJobWithPriority.lua +14 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/batches.lua +18 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/checkItemInList.lua +12 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/cleanList.lua +47 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/cleanSet.lua +66 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/collectMetrics.lua +46 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/deduplicateJob.lua +24 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/destructureJobKey.lua +12 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/findPage.lua +70 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/getDelayedScore.lua +25 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/getJobsInZset.lua +13 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/getNextDelayedTimestamp.lua +12 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/getOrSetMaxEvents.lua +11 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/getRateLimitTTL.lua +17 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/getTargetQueueList.lua +22 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/getTimestamp.lua +19 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/getZSetItems.lua +7 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/handleDuplicatedJob.lua +26 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/isLocked.lua +33 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/isQueueMaxed.lua +15 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/isQueuePaused.lua +7 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/isQueuePausedOrMaxed.lua +18 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/moveJobFromPriorityToActive.lua +13 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/moveParentFromWaitingChildrenToFailed.lua +53 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/moveParentToWaitIfNeeded.lua +55 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/prepareJobForProcessing.lua +50 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/promoteDelayedJobs.lua +40 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/pushBackJobWithPriority.lua +9 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/removeDeduplicationKey.lua +11 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/removeDeduplicationKeyIfNeeded.lua +14 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/removeJob.lua +17 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/removeJobFromAnyState.lua +35 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/removeJobKeys.lua +8 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/removeJobs.lua +13 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/removeJobsByMaxAge.lua +16 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/removeJobsByMaxCount.lua +15 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/removeJobsOnFail.lua +36 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/removeListJobs.lua +17 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/removeLock.lua +19 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/removeParentDependencyKey.lua +90 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/removeZSetJobs.lua +27 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/storeJob.lua +36 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/trimEvents.lua +15 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/updateExistingJobsParent.lua +27 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/updateJobFields.lua +11 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/includes/updateParentDepsIfNeeded.lua +13 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/isFinished-3.lua +48 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/isJobInList-1.lua +16 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/isMaxed-2.lua +17 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/moveJobFromActiveToWait-10.lua +60 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/moveJobsToWait-8.lua +73 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/moveStalledJobsToWait-9.lua +156 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/moveToActive-11.lua +93 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/moveToDelayed-8.lua +77 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/moveToFinished-14.lua +283 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/moveToWaitingChildren-5.lua +68 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/obliterate-2.lua +118 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/paginate-1.lua +49 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/pause-7.lua +42 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/promote-9.lua +62 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/releaseLock-1.lua +19 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/removeChildDependency-1.lua +34 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/removeJob-2.lua +92 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/removeJobScheduler-3.lua +43 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/removeRepeatable-3.lua +58 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/reprocessJob-8.lua +49 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/retryJob-11.lua +82 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/saveStacktrace-1.lua +19 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/updateData-1.lua +20 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/updateProgress-3.lua +33 -0
- package/dist/node_modules/bullmq/dist/cjs/commands/updateRepeatableJobMillis-1.lua +28 -0
- package/dist/node_modules/bullmq/dist/cjs/enums/child-command.js +10 -0
- package/dist/node_modules/bullmq/dist/cjs/enums/error-code.js +15 -0
- package/dist/node_modules/bullmq/dist/cjs/enums/index.js +9 -0
- package/dist/node_modules/bullmq/dist/cjs/enums/metrics-time.js +15 -0
- package/dist/node_modules/bullmq/dist/cjs/enums/parent-command.js +16 -0
- package/dist/node_modules/bullmq/dist/cjs/enums/telemetry-attributes.js +48 -0
- package/dist/node_modules/bullmq/dist/cjs/index.js +1 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/advanced-options.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/backoff-options.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/base-job-options.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/child-message.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/connection.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/debounce-options.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/flow-job.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/index.js +32 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/ioredis-events.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/job-json.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/job-scheduler-json.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/keep-jobs.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/metrics-options.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/metrics.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/minimal-job.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/parent-message.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/parent.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/queue-options.js +9 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/rate-limiter-options.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/redis-options.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/redis-streams.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/repeat-options.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/repeatable-job.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/repeatable-options.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/sandboxed-job-processor.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/sandboxed-job.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/sandboxed-options.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/telemetry.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/interfaces/worker-options.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/addDelayedJob-6.js +373 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/addJobScheduler-2.js +237 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/addLog-2.js +33 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/addParentJob-4.js +340 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/addPrioritizedJob-8.js +350 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/addRepeatableJob-2.js +230 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/addStandardJob-8.js +354 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/changeDelay-4.js +107 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/changePriority-7.js +122 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/cleanJobsInSet-3.js +350 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/drain-5.js +258 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/extendLock-2.js +30 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/extendLocks-1.js +46 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/getCounts-1.js +42 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/getCountsPerPriority-4.js +46 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/getJobScheduler-1.js +23 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/getRanges-1.js +73 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/getRateLimitTtl-1.js +39 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/getState-8.js +73 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/getStateV2-8.js +57 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/index.js +49 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/isFinished-3.js +49 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/isJobInList-1.js +32 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/isMaxed-2.js +34 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/moveJobFromActiveToWait-10.js +110 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/moveJobsToWait-8.js +118 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/moveStalledJobsToWait-9.js +529 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/moveToActive-11.js +233 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/moveToDelayed-8.js +156 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/moveToFinished-14.js +798 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/moveToWaitingChildren-5.js +83 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/obliterate-2.js +327 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/paginate-1.js +110 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/pause-7.js +67 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/promote-9.js +105 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/releaseLock-1.js +25 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/removeChildDependency-1.js +165 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/removeJob-2.js +292 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/removeJobScheduler-3.js +49 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/removeRepeatable-3.js +63 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/reprocessJob-8.js +96 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/retryJob-11.js +193 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/saveStacktrace-1.js +27 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/updateData-1.js +26 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/updateProgress-3.js +46 -0
- package/dist/node_modules/bullmq/dist/cjs/scripts/updateRepeatableJobMillis-1.js +33 -0
- package/dist/node_modules/bullmq/dist/cjs/tsconfig-cjs.tsbuildinfo +1 -0
- package/dist/node_modules/bullmq/dist/cjs/types/backoff-strategy.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/types/finished-status.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/types/index.js +12 -0
- package/dist/node_modules/bullmq/dist/cjs/types/job-json-sandbox.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/types/job-options.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/types/job-scheduler-template-options.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/types/job-type.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/types/minimal-queue.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/types/repeat-strategy.js +3 -0
- package/dist/node_modules/bullmq/dist/cjs/utils.js +288 -0
- package/dist/node_modules/bullmq/dist/cjs/version.js +5 -0
- package/dist/node_modules/bullmq/dist/esm/classes/async-fifo-queue.d.ts +37 -0
- package/dist/node_modules/bullmq/dist/esm/classes/async-fifo-queue.js +125 -0
- package/dist/node_modules/bullmq/dist/esm/classes/backoffs.d.ts +10 -0
- package/dist/node_modules/bullmq/dist/esm/classes/backoffs.js +44 -0
- package/dist/node_modules/bullmq/dist/esm/classes/child-pool.d.ts +23 -0
- package/dist/node_modules/bullmq/dist/esm/classes/child-pool.js +67 -0
- package/dist/node_modules/bullmq/dist/esm/classes/child-processor.d.ts +37 -0
- package/dist/node_modules/bullmq/dist/esm/classes/child-processor.js +150 -0
- package/dist/node_modules/bullmq/dist/esm/classes/child.d.ts +35 -0
- package/dist/node_modules/bullmq/dist/esm/classes/child.js +206 -0
- package/dist/node_modules/bullmq/dist/esm/classes/errors/delayed-error.d.ts +11 -0
- package/dist/node_modules/bullmq/dist/esm/classes/errors/delayed-error.js +16 -0
- package/dist/node_modules/bullmq/dist/esm/classes/errors/index.d.ts +4 -0
- package/dist/node_modules/bullmq/dist/esm/classes/errors/index.js +5 -0
- package/dist/node_modules/bullmq/dist/esm/classes/errors/rate-limit-error.d.ts +10 -0
- package/dist/node_modules/bullmq/dist/esm/classes/errors/rate-limit-error.js +15 -0
- package/dist/node_modules/bullmq/dist/esm/classes/errors/unrecoverable-error.d.ts +11 -0
- package/dist/node_modules/bullmq/dist/esm/classes/errors/unrecoverable-error.js +16 -0
- package/dist/node_modules/bullmq/dist/esm/classes/errors/waiting-children-error.d.ts +11 -0
- package/dist/node_modules/bullmq/dist/esm/classes/errors/waiting-children-error.js +16 -0
- package/dist/node_modules/bullmq/dist/esm/classes/flow-producer.d.ts +179 -0
- package/dist/node_modules/bullmq/dist/esm/classes/flow-producer.js +335 -0
- package/dist/node_modules/bullmq/dist/esm/classes/index.d.ts +19 -0
- package/dist/node_modules/bullmq/dist/esm/classes/index.js +22 -0
- package/dist/node_modules/bullmq/dist/esm/classes/job-scheduler.d.ts +24 -0
- package/dist/node_modules/bullmq/dist/esm/classes/job-scheduler.js +216 -0
- package/dist/node_modules/bullmq/dist/esm/classes/job.d.ts +425 -0
- package/dist/node_modules/bullmq/dist/esm/classes/job.js +889 -0
- package/dist/node_modules/bullmq/dist/esm/classes/main-base.d.ts +4 -0
- package/dist/node_modules/bullmq/dist/esm/classes/main-base.js +42 -0
- package/dist/node_modules/bullmq/dist/esm/classes/main-worker.d.ts +1 -0
- package/dist/node_modules/bullmq/dist/esm/classes/main-worker.js +8 -0
- package/dist/node_modules/bullmq/dist/esm/classes/main.d.ts +1 -0
- package/dist/node_modules/bullmq/dist/esm/classes/main.js +8 -0
- package/dist/node_modules/bullmq/dist/esm/classes/queue-base.d.ts +83 -0
- package/dist/node_modules/bullmq/dist/esm/classes/queue-base.js +151 -0
- package/dist/node_modules/bullmq/dist/esm/classes/queue-events-producer.d.ts +21 -0
- package/dist/node_modules/bullmq/dist/esm/classes/queue-events-producer.js +38 -0
- package/dist/node_modules/bullmq/dist/esm/classes/queue-events.d.ts +201 -0
- package/dist/node_modules/bullmq/dist/esm/classes/queue-events.js +121 -0
- package/dist/node_modules/bullmq/dist/esm/classes/queue-getters.d.ts +235 -0
- package/dist/node_modules/bullmq/dist/esm/classes/queue-getters.js +447 -0
- package/dist/node_modules/bullmq/dist/esm/classes/queue-keys.d.ts +10 -0
- package/dist/node_modules/bullmq/dist/esm/classes/queue-keys.js +39 -0
- package/dist/node_modules/bullmq/dist/esm/classes/queue.d.ts +406 -0
- package/dist/node_modules/bullmq/dist/esm/classes/queue.js +631 -0
- package/dist/node_modules/bullmq/dist/esm/classes/redis-connection.d.ts +46 -0
- package/dist/node_modules/bullmq/dist/esm/classes/redis-connection.js +266 -0
- package/dist/node_modules/bullmq/dist/esm/classes/repeat.d.ts +25 -0
- package/dist/node_modules/bullmq/dist/esm/classes/repeat.js +199 -0
- package/dist/node_modules/bullmq/dist/esm/classes/sandbox.d.ts +4 -0
- package/dist/node_modules/bullmq/dist/esm/classes/sandbox.js +73 -0
- package/dist/node_modules/bullmq/dist/esm/classes/scripts.d.ts +160 -0
- package/dist/node_modules/bullmq/dist/esm/classes/scripts.js +1031 -0
- package/dist/node_modules/bullmq/dist/esm/classes/worker.d.ts +231 -0
- package/dist/node_modules/bullmq/dist/esm/classes/worker.js +815 -0
- package/dist/node_modules/bullmq/dist/esm/commands/addDelayedJob-6.lua +119 -0
- package/dist/node_modules/bullmq/dist/esm/commands/addJobScheduler-2.lua +91 -0
- package/dist/node_modules/bullmq/dist/esm/commands/addLog-2.lua +30 -0
- package/dist/node_modules/bullmq/dist/esm/commands/addParentJob-4.lua +104 -0
- package/dist/node_modules/bullmq/dist/esm/commands/addPrioritizedJob-8.lua +117 -0
- package/dist/node_modules/bullmq/dist/esm/commands/addRepeatableJob-2.lua +84 -0
- package/dist/node_modules/bullmq/dist/esm/commands/addStandardJob-8.lua +122 -0
- package/dist/node_modules/bullmq/dist/esm/commands/changeDelay-4.lua +55 -0
- package/dist/node_modules/bullmq/dist/esm/commands/changePriority-7.lua +68 -0
- package/dist/node_modules/bullmq/dist/esm/commands/cleanJobsInSet-3.lua +55 -0
- package/dist/node_modules/bullmq/dist/esm/commands/drain-5.lua +41 -0
- package/dist/node_modules/bullmq/dist/esm/commands/extendLock-2.lua +23 -0
- package/dist/node_modules/bullmq/dist/esm/commands/extendLocks-1.lua +44 -0
- package/dist/node_modules/bullmq/dist/esm/commands/getCounts-1.lua +36 -0
- package/dist/node_modules/bullmq/dist/esm/commands/getCountsPerPriority-4.lua +35 -0
- package/dist/node_modules/bullmq/dist/esm/commands/getJobScheduler-1.lua +19 -0
- package/dist/node_modules/bullmq/dist/esm/commands/getRanges-1.lua +70 -0
- package/dist/node_modules/bullmq/dist/esm/commands/getRateLimitTtl-1.lua +20 -0
- package/dist/node_modules/bullmq/dist/esm/commands/getState-8.lua +65 -0
- package/dist/node_modules/bullmq/dist/esm/commands/getStateV2-8.lua +58 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/addBaseMarkerIfNeeded.lua +9 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/addDelayMarkerIfNeeded.lua +15 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/addJobInTargetList.lua +11 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/addJobWithPriority.lua +14 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/batches.lua +18 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/checkItemInList.lua +12 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/cleanList.lua +47 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/cleanSet.lua +66 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/collectMetrics.lua +46 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/deduplicateJob.lua +24 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/destructureJobKey.lua +12 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/findPage.lua +70 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/getDelayedScore.lua +25 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/getJobsInZset.lua +13 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/getNextDelayedTimestamp.lua +12 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/getOrSetMaxEvents.lua +11 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/getRateLimitTTL.lua +17 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/getTargetQueueList.lua +22 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/getTimestamp.lua +19 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/getZSetItems.lua +7 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/handleDuplicatedJob.lua +26 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/isLocked.lua +33 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/isQueueMaxed.lua +15 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/isQueuePaused.lua +7 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/isQueuePausedOrMaxed.lua +18 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/moveJobFromPriorityToActive.lua +13 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/moveParentFromWaitingChildrenToFailed.lua +53 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/moveParentToWaitIfNeeded.lua +55 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/prepareJobForProcessing.lua +50 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/promoteDelayedJobs.lua +40 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/pushBackJobWithPriority.lua +9 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/removeDeduplicationKey.lua +11 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/removeDeduplicationKeyIfNeeded.lua +14 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/removeJob.lua +17 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/removeJobFromAnyState.lua +35 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/removeJobKeys.lua +8 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/removeJobs.lua +13 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/removeJobsByMaxAge.lua +16 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/removeJobsByMaxCount.lua +15 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/removeJobsOnFail.lua +36 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/removeListJobs.lua +17 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/removeLock.lua +19 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/removeParentDependencyKey.lua +90 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/removeZSetJobs.lua +27 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/storeJob.lua +36 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/trimEvents.lua +15 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/updateExistingJobsParent.lua +27 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/updateJobFields.lua +11 -0
- package/dist/node_modules/bullmq/dist/esm/commands/includes/updateParentDepsIfNeeded.lua +13 -0
- package/dist/node_modules/bullmq/dist/esm/commands/isFinished-3.lua +48 -0
- package/dist/node_modules/bullmq/dist/esm/commands/isJobInList-1.lua +16 -0
- package/dist/node_modules/bullmq/dist/esm/commands/isMaxed-2.lua +17 -0
- package/dist/node_modules/bullmq/dist/esm/commands/moveJobFromActiveToWait-10.lua +60 -0
- package/dist/node_modules/bullmq/dist/esm/commands/moveJobsToWait-8.lua +73 -0
- package/dist/node_modules/bullmq/dist/esm/commands/moveStalledJobsToWait-9.lua +156 -0
- package/dist/node_modules/bullmq/dist/esm/commands/moveToActive-11.lua +93 -0
- package/dist/node_modules/bullmq/dist/esm/commands/moveToDelayed-8.lua +77 -0
- package/dist/node_modules/bullmq/dist/esm/commands/moveToFinished-14.lua +283 -0
- package/dist/node_modules/bullmq/dist/esm/commands/moveToWaitingChildren-5.lua +68 -0
- package/dist/node_modules/bullmq/dist/esm/commands/obliterate-2.lua +118 -0
- package/dist/node_modules/bullmq/dist/esm/commands/paginate-1.lua +49 -0
- package/dist/node_modules/bullmq/dist/esm/commands/pause-7.lua +42 -0
- package/dist/node_modules/bullmq/dist/esm/commands/promote-9.lua +62 -0
- package/dist/node_modules/bullmq/dist/esm/commands/releaseLock-1.lua +19 -0
- package/dist/node_modules/bullmq/dist/esm/commands/removeChildDependency-1.lua +34 -0
- package/dist/node_modules/bullmq/dist/esm/commands/removeJob-2.lua +92 -0
- package/dist/node_modules/bullmq/dist/esm/commands/removeJobScheduler-3.lua +43 -0
- package/dist/node_modules/bullmq/dist/esm/commands/removeRepeatable-3.lua +58 -0
- package/dist/node_modules/bullmq/dist/esm/commands/reprocessJob-8.lua +49 -0
- package/dist/node_modules/bullmq/dist/esm/commands/retryJob-11.lua +82 -0
- package/dist/node_modules/bullmq/dist/esm/commands/saveStacktrace-1.lua +19 -0
- package/dist/node_modules/bullmq/dist/esm/commands/updateData-1.lua +20 -0
- package/dist/node_modules/bullmq/dist/esm/commands/updateProgress-3.lua +33 -0
- package/dist/node_modules/bullmq/dist/esm/commands/updateRepeatableJobMillis-1.lua +28 -0
- package/dist/node_modules/bullmq/dist/esm/enums/child-command.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/enums/child-command.js +7 -0
- package/dist/node_modules/bullmq/dist/esm/enums/error-code.d.ts +10 -0
- package/dist/node_modules/bullmq/dist/esm/enums/error-code.js +12 -0
- package/dist/node_modules/bullmq/dist/esm/enums/index.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/enums/index.js +6 -0
- package/dist/node_modules/bullmq/dist/esm/enums/metrics-time.d.ts +10 -0
- package/dist/node_modules/bullmq/dist/esm/enums/metrics-time.js +12 -0
- package/dist/node_modules/bullmq/dist/esm/enums/parent-command.d.ts +11 -0
- package/dist/node_modules/bullmq/dist/esm/enums/parent-command.js +13 -0
- package/dist/node_modules/bullmq/dist/esm/enums/telemetry-attributes.d.ts +42 -0
- package/dist/node_modules/bullmq/dist/esm/enums/telemetry-attributes.js +45 -0
- package/dist/node_modules/bullmq/dist/esm/index.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/index.js +6 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/advanced-options.d.ts +18 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/advanced-options.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/backoff-options.d.ts +15 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/backoff-options.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/base-job-options.d.ts +100 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/base-job-options.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/child-message.d.ts +6 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/child-message.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/connection.d.ts +8 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/connection.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/debounce-options.d.ts +13 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/debounce-options.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/flow-job.d.ts +19 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/flow-job.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/index.d.ts +28 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/index.js +29 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/ioredis-events.d.ts +8 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/ioredis-events.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/job-json.d.ts +47 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/job-json.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/job-scheduler-json.d.ts +16 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/job-scheduler-json.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/keep-jobs.d.ts +17 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/keep-jobs.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/metrics-options.d.ts +12 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/metrics-options.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/metrics.d.ts +9 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/metrics.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/minimal-job.d.ts +133 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/minimal-job.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/parent-message.d.ts +8 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/parent-message.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/parent.d.ts +20 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/parent.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/queue-options.d.ts +97 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/queue-options.js +6 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/rate-limiter-options.d.ts +12 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/rate-limiter-options.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/redis-options.d.ts +8 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/redis-options.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/redis-streams.d.ts +4 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/redis-streams.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/repeat-options.d.ts +51 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/repeat-options.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/repeatable-job.d.ts +10 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/repeatable-job.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/repeatable-options.d.ts +7 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/repeatable-options.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/sandboxed-job-processor.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/sandboxed-job-processor.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/sandboxed-job.d.ts +13 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/sandboxed-job.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/sandboxed-options.d.ts +28 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/sandboxed-options.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/telemetry.d.ts +150 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/telemetry.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/worker-options.d.ts +133 -0
- package/dist/node_modules/bullmq/dist/esm/interfaces/worker-options.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/addDelayedJob-6.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/addDelayedJob-6.js +370 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/addJobScheduler-2.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/addJobScheduler-2.js +234 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/addLog-2.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/addLog-2.js +30 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/addParentJob-4.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/addParentJob-4.js +337 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/addPrioritizedJob-8.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/addPrioritizedJob-8.js +347 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/addRepeatableJob-2.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/addRepeatableJob-2.js +227 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/addStandardJob-8.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/addStandardJob-8.js +351 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/changeDelay-4.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/changeDelay-4.js +104 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/changePriority-7.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/changePriority-7.js +119 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/cleanJobsInSet-3.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/cleanJobsInSet-3.js +347 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/drain-5.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/drain-5.js +255 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/extendLock-2.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/extendLock-2.js +27 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/extendLocks-1.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/extendLocks-1.js +43 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/getCounts-1.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/getCounts-1.js +39 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/getCountsPerPriority-4.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/getCountsPerPriority-4.js +43 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/getJobScheduler-1.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/getJobScheduler-1.js +20 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/getRanges-1.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/getRanges-1.js +70 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/getRateLimitTtl-1.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/getRateLimitTtl-1.js +36 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/getState-8.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/getState-8.js +70 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/getStateV2-8.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/getStateV2-8.js +54 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/index.d.ts +45 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/index.js +46 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/isFinished-3.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/isFinished-3.js +46 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/isJobInList-1.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/isJobInList-1.js +29 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/isMaxed-2.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/isMaxed-2.js +31 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/moveJobFromActiveToWait-10.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/moveJobFromActiveToWait-10.js +107 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/moveJobsToWait-8.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/moveJobsToWait-8.js +115 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/moveStalledJobsToWait-9.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/moveStalledJobsToWait-9.js +526 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/moveToActive-11.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/moveToActive-11.js +230 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/moveToDelayed-8.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/moveToDelayed-8.js +153 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/moveToFinished-14.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/moveToFinished-14.js +795 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/moveToWaitingChildren-5.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/moveToWaitingChildren-5.js +80 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/obliterate-2.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/obliterate-2.js +324 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/paginate-1.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/paginate-1.js +107 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/pause-7.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/pause-7.js +64 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/promote-9.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/promote-9.js +102 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/releaseLock-1.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/releaseLock-1.js +22 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/removeChildDependency-1.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/removeChildDependency-1.js +162 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/removeJob-2.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/removeJob-2.js +289 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/removeJobScheduler-3.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/removeJobScheduler-3.js +46 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/removeRepeatable-3.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/removeRepeatable-3.js +60 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/reprocessJob-8.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/reprocessJob-8.js +93 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/retryJob-11.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/retryJob-11.js +190 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/saveStacktrace-1.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/saveStacktrace-1.js +24 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/updateData-1.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/updateData-1.js +23 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/updateProgress-3.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/updateProgress-3.js +43 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/updateRepeatableJobMillis-1.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/scripts/updateRepeatableJobMillis-1.js +30 -0
- package/dist/node_modules/bullmq/dist/esm/tsconfig.tsbuildinfo +1 -0
- package/dist/node_modules/bullmq/dist/esm/types/backoff-strategy.d.ts +2 -0
- package/dist/node_modules/bullmq/dist/esm/types/backoff-strategy.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/types/finished-status.d.ts +2 -0
- package/dist/node_modules/bullmq/dist/esm/types/finished-status.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/types/index.d.ts +8 -0
- package/dist/node_modules/bullmq/dist/esm/types/index.js +9 -0
- package/dist/node_modules/bullmq/dist/esm/types/job-json-sandbox.d.ts +5 -0
- package/dist/node_modules/bullmq/dist/esm/types/job-json-sandbox.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/types/job-options.d.ts +81 -0
- package/dist/node_modules/bullmq/dist/esm/types/job-options.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/types/job-scheduler-template-options.d.ts +2 -0
- package/dist/node_modules/bullmq/dist/esm/types/job-scheduler-template-options.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/types/job-type.d.ts +3 -0
- package/dist/node_modules/bullmq/dist/esm/types/job-type.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/types/minimal-queue.d.ts +2 -0
- package/dist/node_modules/bullmq/dist/esm/types/minimal-queue.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/types/repeat-strategy.d.ts +2 -0
- package/dist/node_modules/bullmq/dist/esm/types/repeat-strategy.js +2 -0
- package/dist/node_modules/bullmq/dist/esm/utils.d.ts +72 -0
- package/dist/node_modules/bullmq/dist/esm/utils.js +263 -0
- package/dist/node_modules/bullmq/dist/esm/version.d.ts +1 -0
- package/dist/node_modules/bullmq/dist/esm/version.js +2 -0
- package/dist/node_modules/bullmq/node_modules/.bin/semver +17 -0
- package/dist/node_modules/bullmq/node_modules/.bin/uuid +17 -0
- package/dist/node_modules/bullmq/package.json +1 -0
- package/dist/server/index.d.ts +1 -0
- package/dist/server/index.js +33 -0
- package/dist/server/plugin.d.ts +11 -0
- package/dist/server/plugin.js +63 -0
- package/package.json +18 -0
- package/server.d.ts +2 -0
- package/server.js +1 -0
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
const content = `--[[
|
|
2
|
+
Promotes a job that is currently "delayed" to the "waiting" state
|
|
3
|
+
Input:
|
|
4
|
+
KEYS[1] 'delayed'
|
|
5
|
+
KEYS[2] 'wait'
|
|
6
|
+
KEYS[3] 'paused'
|
|
7
|
+
KEYS[4] 'meta'
|
|
8
|
+
KEYS[5] 'prioritized'
|
|
9
|
+
KEYS[6] 'active'
|
|
10
|
+
KEYS[7] 'pc' priority counter
|
|
11
|
+
KEYS[8] 'event stream'
|
|
12
|
+
KEYS[9] 'marker'
|
|
13
|
+
ARGV[1] queue.toKey('')
|
|
14
|
+
ARGV[2] jobId
|
|
15
|
+
Output:
|
|
16
|
+
0 - OK
|
|
17
|
+
-3 - Job not in delayed zset.
|
|
18
|
+
Events:
|
|
19
|
+
'waiting'
|
|
20
|
+
]]
|
|
21
|
+
local rcall = redis.call
|
|
22
|
+
local jobId = ARGV[2]
|
|
23
|
+
-- Includes
|
|
24
|
+
--[[
|
|
25
|
+
Function to add job in target list and add marker if needed.
|
|
26
|
+
]]
|
|
27
|
+
-- Includes
|
|
28
|
+
--[[
|
|
29
|
+
Add marker if needed when a job is available.
|
|
30
|
+
]]
|
|
31
|
+
local function addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed)
|
|
32
|
+
if not isPausedOrMaxed then
|
|
33
|
+
rcall("ZADD", markerKey, 0, "0")
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
local function addJobInTargetList(targetKey, markerKey, pushCmd, isPausedOrMaxed, jobId)
|
|
37
|
+
rcall(pushCmd, targetKey, jobId)
|
|
38
|
+
addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed)
|
|
39
|
+
end
|
|
40
|
+
--[[
|
|
41
|
+
Function to add job considering priority.
|
|
42
|
+
]]
|
|
43
|
+
-- Includes
|
|
44
|
+
local function addJobWithPriority(markerKey, prioritizedKey, priority, jobId, priorityCounterKey,
|
|
45
|
+
isPausedOrMaxed)
|
|
46
|
+
local prioCounter = rcall("INCR", priorityCounterKey)
|
|
47
|
+
local score = priority * 0x100000000 + prioCounter % 0x100000000
|
|
48
|
+
rcall("ZADD", prioritizedKey, score, jobId)
|
|
49
|
+
addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed)
|
|
50
|
+
end
|
|
51
|
+
--[[
|
|
52
|
+
Function to check for the meta.paused key to decide if we are paused or not
|
|
53
|
+
(since an empty list and !EXISTS are not really the same).
|
|
54
|
+
]]
|
|
55
|
+
local function getTargetQueueList(queueMetaKey, activeKey, waitKey, pausedKey)
|
|
56
|
+
local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency")
|
|
57
|
+
if queueAttributes[1] then
|
|
58
|
+
return pausedKey, true
|
|
59
|
+
else
|
|
60
|
+
if queueAttributes[2] then
|
|
61
|
+
local activeCount = rcall("LLEN", activeKey)
|
|
62
|
+
if activeCount >= tonumber(queueAttributes[2]) then
|
|
63
|
+
return waitKey, true
|
|
64
|
+
else
|
|
65
|
+
return waitKey, false
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
return waitKey, false
|
|
70
|
+
end
|
|
71
|
+
if rcall("ZREM", KEYS[1], jobId) == 1 then
|
|
72
|
+
local jobKey = ARGV[1] .. jobId
|
|
73
|
+
local priority = tonumber(rcall("HGET", jobKey, "priority")) or 0
|
|
74
|
+
local metaKey = KEYS[4]
|
|
75
|
+
local markerKey = KEYS[9]
|
|
76
|
+
-- Remove delayed "marker" from the wait list if there is any.
|
|
77
|
+
-- Since we are adding a job we do not need the marker anymore.
|
|
78
|
+
-- Markers in waitlist DEPRECATED in v5: Remove in v6.
|
|
79
|
+
local target, isPausedOrMaxed = getTargetQueueList(metaKey, KEYS[6], KEYS[2], KEYS[3])
|
|
80
|
+
local marker = rcall("LINDEX", target, 0)
|
|
81
|
+
if marker and string.sub(marker, 1, 2) == "0:" then rcall("LPOP", target) end
|
|
82
|
+
if priority == 0 then
|
|
83
|
+
-- LIFO or FIFO
|
|
84
|
+
addJobInTargetList(target, markerKey, "LPUSH", isPausedOrMaxed, jobId)
|
|
85
|
+
else
|
|
86
|
+
addJobWithPriority(markerKey, KEYS[5], priority, jobId, KEYS[7], isPausedOrMaxed)
|
|
87
|
+
end
|
|
88
|
+
-- Emit waiting event (wait..ing@token)
|
|
89
|
+
rcall("XADD", KEYS[8], "*", "event", "waiting", "jobId", jobId, "prev",
|
|
90
|
+
"delayed");
|
|
91
|
+
rcall("HSET", jobKey, "delay", 0)
|
|
92
|
+
return 0
|
|
93
|
+
else
|
|
94
|
+
return -3
|
|
95
|
+
end
|
|
96
|
+
`;
|
|
97
|
+
export const promote = {
|
|
98
|
+
name: 'promote',
|
|
99
|
+
content,
|
|
100
|
+
keys: 9,
|
|
101
|
+
};
|
|
102
|
+
//# sourceMappingURL=promote-9.js.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
const content = `--[[
|
|
2
|
+
Release lock
|
|
3
|
+
Input:
|
|
4
|
+
KEYS[1] 'lock',
|
|
5
|
+
ARGV[1] token
|
|
6
|
+
ARGV[2] lock duration in milliseconds
|
|
7
|
+
Output:
|
|
8
|
+
"OK" if lock extented succesfully.
|
|
9
|
+
]]
|
|
10
|
+
local rcall = redis.call
|
|
11
|
+
if rcall("GET", KEYS[1]) == ARGV[1] then
|
|
12
|
+
return rcall("DEL", KEYS[1])
|
|
13
|
+
else
|
|
14
|
+
return 0
|
|
15
|
+
end
|
|
16
|
+
`;
|
|
17
|
+
export const releaseLock = {
|
|
18
|
+
name: 'releaseLock',
|
|
19
|
+
content,
|
|
20
|
+
keys: 1,
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=releaseLock-1.js.map
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
const content = `--[[
|
|
2
|
+
Break parent-child dependency by removing
|
|
3
|
+
child reference from parent
|
|
4
|
+
Input:
|
|
5
|
+
KEYS[1] 'key' prefix,
|
|
6
|
+
ARGV[1] job key
|
|
7
|
+
ARGV[2] parent key
|
|
8
|
+
Output:
|
|
9
|
+
0 - OK
|
|
10
|
+
1 - There is not relationship.
|
|
11
|
+
-1 - Missing job key
|
|
12
|
+
-5 - Missing parent key
|
|
13
|
+
]]
|
|
14
|
+
local rcall = redis.call
|
|
15
|
+
local jobKey = ARGV[1]
|
|
16
|
+
local parentKey = ARGV[2]
|
|
17
|
+
-- Includes
|
|
18
|
+
--[[
|
|
19
|
+
Check if this job has a parent. If so we will just remove it from
|
|
20
|
+
the parent child list, but if it is the last child we should move the parent to "wait/paused"
|
|
21
|
+
which requires code from "moveToFinished"
|
|
22
|
+
]]
|
|
23
|
+
-- Includes
|
|
24
|
+
--[[
|
|
25
|
+
Function to add job in target list and add marker if needed.
|
|
26
|
+
]]
|
|
27
|
+
-- Includes
|
|
28
|
+
--[[
|
|
29
|
+
Add marker if needed when a job is available.
|
|
30
|
+
]]
|
|
31
|
+
local function addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed)
|
|
32
|
+
if not isPausedOrMaxed then
|
|
33
|
+
rcall("ZADD", markerKey, 0, "0")
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
local function addJobInTargetList(targetKey, markerKey, pushCmd, isPausedOrMaxed, jobId)
|
|
37
|
+
rcall(pushCmd, targetKey, jobId)
|
|
38
|
+
addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed)
|
|
39
|
+
end
|
|
40
|
+
--[[
|
|
41
|
+
Functions to destructure job key.
|
|
42
|
+
Just a bit of warning, these functions may be a bit slow and affect performance significantly.
|
|
43
|
+
]]
|
|
44
|
+
local getJobIdFromKey = function (jobKey)
|
|
45
|
+
return string.match(jobKey, ".*:(.*)")
|
|
46
|
+
end
|
|
47
|
+
local getJobKeyPrefix = function (jobKey, jobId)
|
|
48
|
+
return string.sub(jobKey, 0, #jobKey - #jobId)
|
|
49
|
+
end
|
|
50
|
+
--[[
|
|
51
|
+
Function to check for the meta.paused key to decide if we are paused or not
|
|
52
|
+
(since an empty list and !EXISTS are not really the same).
|
|
53
|
+
]]
|
|
54
|
+
local function getTargetQueueList(queueMetaKey, activeKey, waitKey, pausedKey)
|
|
55
|
+
local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency")
|
|
56
|
+
if queueAttributes[1] then
|
|
57
|
+
return pausedKey, true
|
|
58
|
+
else
|
|
59
|
+
if queueAttributes[2] then
|
|
60
|
+
local activeCount = rcall("LLEN", activeKey)
|
|
61
|
+
if activeCount >= tonumber(queueAttributes[2]) then
|
|
62
|
+
return waitKey, true
|
|
63
|
+
else
|
|
64
|
+
return waitKey, false
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
return waitKey, false
|
|
69
|
+
end
|
|
70
|
+
--[[
|
|
71
|
+
Function to remove job keys.
|
|
72
|
+
]]
|
|
73
|
+
local function removeJobKeys(jobKey)
|
|
74
|
+
return rcall("DEL", jobKey, jobKey .. ':logs',
|
|
75
|
+
jobKey .. ':dependencies', jobKey .. ':processed', jobKey .. ':failed')
|
|
76
|
+
end
|
|
77
|
+
local function moveParentToWait(parentPrefix, parentId, emitEvent)
|
|
78
|
+
local parentTarget, isPausedOrMaxed = getTargetQueueList(parentPrefix .. "meta", parentPrefix .. "active",
|
|
79
|
+
parentPrefix .. "wait", parentPrefix .. "paused")
|
|
80
|
+
addJobInTargetList(parentTarget, parentPrefix .. "marker", "RPUSH", isPausedOrMaxed, parentId)
|
|
81
|
+
if emitEvent then
|
|
82
|
+
local parentEventStream = parentPrefix .. "events"
|
|
83
|
+
rcall("XADD", parentEventStream, "*", "event", "waiting", "jobId", parentId, "prev", "waiting-children")
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
local function removeParentDependencyKey(jobKey, hard, parentKey, baseKey, debounceId)
|
|
87
|
+
if parentKey then
|
|
88
|
+
local parentDependenciesKey = parentKey .. ":dependencies"
|
|
89
|
+
local result = rcall("SREM", parentDependenciesKey, jobKey)
|
|
90
|
+
if result > 0 then
|
|
91
|
+
local pendingDependencies = rcall("SCARD", parentDependenciesKey)
|
|
92
|
+
if pendingDependencies == 0 then
|
|
93
|
+
local parentId = getJobIdFromKey(parentKey)
|
|
94
|
+
local parentPrefix = getJobKeyPrefix(parentKey, parentId)
|
|
95
|
+
local numRemovedElements = rcall("ZREM", parentPrefix .. "waiting-children", parentId)
|
|
96
|
+
if numRemovedElements == 1 then
|
|
97
|
+
if hard then -- remove parent in same queue
|
|
98
|
+
if parentPrefix == baseKey then
|
|
99
|
+
removeParentDependencyKey(parentKey, hard, nil, baseKey, nil)
|
|
100
|
+
removeJobKeys(parentKey)
|
|
101
|
+
if debounceId then
|
|
102
|
+
rcall("DEL", parentPrefix .. "de:" .. debounceId)
|
|
103
|
+
end
|
|
104
|
+
else
|
|
105
|
+
moveParentToWait(parentPrefix, parentId)
|
|
106
|
+
end
|
|
107
|
+
else
|
|
108
|
+
moveParentToWait(parentPrefix, parentId, true)
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
end
|
|
112
|
+
return true
|
|
113
|
+
end
|
|
114
|
+
else
|
|
115
|
+
local parentAttributes = rcall("HMGET", jobKey, "parentKey", "deid")
|
|
116
|
+
local missedParentKey = parentAttributes[1]
|
|
117
|
+
if( (type(missedParentKey) == "string") and missedParentKey ~= ""
|
|
118
|
+
and (rcall("EXISTS", missedParentKey) == 1)) then
|
|
119
|
+
local parentDependenciesKey = missedParentKey .. ":dependencies"
|
|
120
|
+
local result = rcall("SREM", parentDependenciesKey, jobKey)
|
|
121
|
+
if result > 0 then
|
|
122
|
+
local pendingDependencies = rcall("SCARD", parentDependenciesKey)
|
|
123
|
+
if pendingDependencies == 0 then
|
|
124
|
+
local parentId = getJobIdFromKey(missedParentKey)
|
|
125
|
+
local parentPrefix = getJobKeyPrefix(missedParentKey, parentId)
|
|
126
|
+
local numRemovedElements = rcall("ZREM", parentPrefix .. "waiting-children", parentId)
|
|
127
|
+
if numRemovedElements == 1 then
|
|
128
|
+
if hard then
|
|
129
|
+
if parentPrefix == baseKey then
|
|
130
|
+
removeParentDependencyKey(missedParentKey, hard, nil, baseKey, nil)
|
|
131
|
+
removeJobKeys(missedParentKey)
|
|
132
|
+
if parentAttributes[2] then
|
|
133
|
+
rcall("DEL", parentPrefix .. "de:" .. parentAttributes[2])
|
|
134
|
+
end
|
|
135
|
+
else
|
|
136
|
+
moveParentToWait(parentPrefix, parentId)
|
|
137
|
+
end
|
|
138
|
+
else
|
|
139
|
+
moveParentToWait(parentPrefix, parentId, true)
|
|
140
|
+
end
|
|
141
|
+
end
|
|
142
|
+
end
|
|
143
|
+
return true
|
|
144
|
+
end
|
|
145
|
+
end
|
|
146
|
+
end
|
|
147
|
+
return false
|
|
148
|
+
end
|
|
149
|
+
if rcall("EXISTS", jobKey) ~= 1 then return -1 end
|
|
150
|
+
if rcall("EXISTS", parentKey) ~= 1 then return -5 end
|
|
151
|
+
if removeParentDependencyKey(jobKey, false, parentKey, KEYS[1], nil) then
|
|
152
|
+
rcall("HDEL", jobKey, "parentKey", "parent")
|
|
153
|
+
return 0
|
|
154
|
+
else
|
|
155
|
+
return 1
|
|
156
|
+
end`;
|
|
157
|
+
export const removeChildDependency = {
|
|
158
|
+
name: 'removeChildDependency',
|
|
159
|
+
content,
|
|
160
|
+
keys: 1,
|
|
161
|
+
};
|
|
162
|
+
//# sourceMappingURL=removeChildDependency-1.js.map
|
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
const content = `--[[
|
|
2
|
+
Remove a job from all the queues it may be in as well as all its data.
|
|
3
|
+
In order to be able to remove a job, it cannot be active.
|
|
4
|
+
Input:
|
|
5
|
+
KEYS[1] queue prefix
|
|
6
|
+
KEYS[2] meta key
|
|
7
|
+
ARGV[1] jobId
|
|
8
|
+
ARGV[2] remove children
|
|
9
|
+
Events:
|
|
10
|
+
'removed'
|
|
11
|
+
]]
|
|
12
|
+
local rcall = redis.call
|
|
13
|
+
-- Includes
|
|
14
|
+
--[[
|
|
15
|
+
Functions to destructure job key.
|
|
16
|
+
Just a bit of warning, these functions may be a bit slow and affect performance significantly.
|
|
17
|
+
]]
|
|
18
|
+
local getJobIdFromKey = function (jobKey)
|
|
19
|
+
return string.match(jobKey, ".*:(.*)")
|
|
20
|
+
end
|
|
21
|
+
local getJobKeyPrefix = function (jobKey, jobId)
|
|
22
|
+
return string.sub(jobKey, 0, #jobKey - #jobId)
|
|
23
|
+
end
|
|
24
|
+
--[[
|
|
25
|
+
Function to get max events value or set by default 10000.
|
|
26
|
+
]]
|
|
27
|
+
local function getOrSetMaxEvents(metaKey)
|
|
28
|
+
local maxEvents = rcall("HGET", metaKey, "opts.maxLenEvents")
|
|
29
|
+
if not maxEvents then
|
|
30
|
+
maxEvents = 10000
|
|
31
|
+
rcall("HSET", metaKey, "opts.maxLenEvents", maxEvents)
|
|
32
|
+
end
|
|
33
|
+
return maxEvents
|
|
34
|
+
end
|
|
35
|
+
--[[
|
|
36
|
+
Function to recursively check if there are no locks
|
|
37
|
+
on the jobs to be removed.
|
|
38
|
+
returns:
|
|
39
|
+
boolean
|
|
40
|
+
]]
|
|
41
|
+
local function isLocked( prefix, jobId, removeChildren)
|
|
42
|
+
local jobKey = prefix .. jobId;
|
|
43
|
+
-- Check if this job is locked
|
|
44
|
+
local lockKey = jobKey .. ':lock'
|
|
45
|
+
local lock = rcall("GET", lockKey)
|
|
46
|
+
if not lock then
|
|
47
|
+
if removeChildren == "1" then
|
|
48
|
+
local dependencies = rcall("SMEMBERS", jobKey .. ":dependencies")
|
|
49
|
+
if (#dependencies > 0) then
|
|
50
|
+
for i, childJobKey in ipairs(dependencies) do
|
|
51
|
+
-- We need to get the jobId for this job.
|
|
52
|
+
local childJobId = getJobIdFromKey(childJobKey)
|
|
53
|
+
local childJobPrefix = getJobKeyPrefix(childJobKey, childJobId)
|
|
54
|
+
local result = isLocked( childJobPrefix, childJobId, removeChildren )
|
|
55
|
+
if result then
|
|
56
|
+
return true
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
return false
|
|
62
|
+
end
|
|
63
|
+
return true
|
|
64
|
+
end
|
|
65
|
+
--[[
|
|
66
|
+
Function to remove deduplication key.
|
|
67
|
+
]]
|
|
68
|
+
local function removeDeduplicationKey(prefixKey, jobKey)
|
|
69
|
+
local deduplicationId = rcall("HGET", jobKey, "deid")
|
|
70
|
+
if deduplicationId then
|
|
71
|
+
local deduplicationKey = prefixKey .. "de:" .. deduplicationId
|
|
72
|
+
rcall("DEL", deduplicationKey)
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
--[[
|
|
76
|
+
Function to remove from any state.
|
|
77
|
+
returns:
|
|
78
|
+
prev state
|
|
79
|
+
]]
|
|
80
|
+
local function removeJobFromAnyState( prefix, jobId)
|
|
81
|
+
-- We start with the ZSCORE checks, since they have O(1) complexity
|
|
82
|
+
if rcall("ZSCORE", prefix .. "completed", jobId) then
|
|
83
|
+
rcall("ZREM", prefix .. "completed", jobId)
|
|
84
|
+
return "completed"
|
|
85
|
+
elseif rcall("ZSCORE", prefix .. "waiting-children", jobId) then
|
|
86
|
+
rcall("ZREM", prefix .. "waiting-children", jobId)
|
|
87
|
+
return "waiting-children"
|
|
88
|
+
elseif rcall("ZSCORE", prefix .. "delayed", jobId) then
|
|
89
|
+
rcall("ZREM", prefix .. "delayed", jobId)
|
|
90
|
+
return "delayed"
|
|
91
|
+
elseif rcall("ZSCORE", prefix .. "failed", jobId) then
|
|
92
|
+
rcall("ZREM", prefix .. "failed", jobId)
|
|
93
|
+
return "failed"
|
|
94
|
+
elseif rcall("ZSCORE", prefix .. "prioritized", jobId) then
|
|
95
|
+
rcall("ZREM", prefix .. "prioritized", jobId)
|
|
96
|
+
return "prioritized"
|
|
97
|
+
-- We remove only 1 element from the list, since we assume they are not added multiple times
|
|
98
|
+
elseif rcall("LREM", prefix .. "wait", 1, jobId) == 1 then
|
|
99
|
+
return "wait"
|
|
100
|
+
elseif rcall("LREM", prefix .. "paused", 1, jobId) == 1 then
|
|
101
|
+
return "paused"
|
|
102
|
+
elseif rcall("LREM", prefix .. "active", 1, jobId) == 1 then
|
|
103
|
+
return "active"
|
|
104
|
+
end
|
|
105
|
+
return "unknown"
|
|
106
|
+
end
|
|
107
|
+
--[[
|
|
108
|
+
Function to remove job keys.
|
|
109
|
+
]]
|
|
110
|
+
local function removeJobKeys(jobKey)
|
|
111
|
+
return rcall("DEL", jobKey, jobKey .. ':logs',
|
|
112
|
+
jobKey .. ':dependencies', jobKey .. ':processed', jobKey .. ':failed')
|
|
113
|
+
end
|
|
114
|
+
--[[
|
|
115
|
+
Check if this job has a parent. If so we will just remove it from
|
|
116
|
+
the parent child list, but if it is the last child we should move the parent to "wait/paused"
|
|
117
|
+
which requires code from "moveToFinished"
|
|
118
|
+
]]
|
|
119
|
+
-- Includes
|
|
120
|
+
--[[
|
|
121
|
+
Function to add job in target list and add marker if needed.
|
|
122
|
+
]]
|
|
123
|
+
-- Includes
|
|
124
|
+
--[[
|
|
125
|
+
Add marker if needed when a job is available.
|
|
126
|
+
]]
|
|
127
|
+
local function addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed)
|
|
128
|
+
if not isPausedOrMaxed then
|
|
129
|
+
rcall("ZADD", markerKey, 0, "0")
|
|
130
|
+
end
|
|
131
|
+
end
|
|
132
|
+
local function addJobInTargetList(targetKey, markerKey, pushCmd, isPausedOrMaxed, jobId)
|
|
133
|
+
rcall(pushCmd, targetKey, jobId)
|
|
134
|
+
addBaseMarkerIfNeeded(markerKey, isPausedOrMaxed)
|
|
135
|
+
end
|
|
136
|
+
--[[
|
|
137
|
+
Function to check for the meta.paused key to decide if we are paused or not
|
|
138
|
+
(since an empty list and !EXISTS are not really the same).
|
|
139
|
+
]]
|
|
140
|
+
local function getTargetQueueList(queueMetaKey, activeKey, waitKey, pausedKey)
|
|
141
|
+
local queueAttributes = rcall("HMGET", queueMetaKey, "paused", "concurrency")
|
|
142
|
+
if queueAttributes[1] then
|
|
143
|
+
return pausedKey, true
|
|
144
|
+
else
|
|
145
|
+
if queueAttributes[2] then
|
|
146
|
+
local activeCount = rcall("LLEN", activeKey)
|
|
147
|
+
if activeCount >= tonumber(queueAttributes[2]) then
|
|
148
|
+
return waitKey, true
|
|
149
|
+
else
|
|
150
|
+
return waitKey, false
|
|
151
|
+
end
|
|
152
|
+
end
|
|
153
|
+
end
|
|
154
|
+
return waitKey, false
|
|
155
|
+
end
|
|
156
|
+
local function moveParentToWait(parentPrefix, parentId, emitEvent)
|
|
157
|
+
local parentTarget, isPausedOrMaxed = getTargetQueueList(parentPrefix .. "meta", parentPrefix .. "active",
|
|
158
|
+
parentPrefix .. "wait", parentPrefix .. "paused")
|
|
159
|
+
addJobInTargetList(parentTarget, parentPrefix .. "marker", "RPUSH", isPausedOrMaxed, parentId)
|
|
160
|
+
if emitEvent then
|
|
161
|
+
local parentEventStream = parentPrefix .. "events"
|
|
162
|
+
rcall("XADD", parentEventStream, "*", "event", "waiting", "jobId", parentId, "prev", "waiting-children")
|
|
163
|
+
end
|
|
164
|
+
end
|
|
165
|
+
local function removeParentDependencyKey(jobKey, hard, parentKey, baseKey, debounceId)
|
|
166
|
+
if parentKey then
|
|
167
|
+
local parentDependenciesKey = parentKey .. ":dependencies"
|
|
168
|
+
local result = rcall("SREM", parentDependenciesKey, jobKey)
|
|
169
|
+
if result > 0 then
|
|
170
|
+
local pendingDependencies = rcall("SCARD", parentDependenciesKey)
|
|
171
|
+
if pendingDependencies == 0 then
|
|
172
|
+
local parentId = getJobIdFromKey(parentKey)
|
|
173
|
+
local parentPrefix = getJobKeyPrefix(parentKey, parentId)
|
|
174
|
+
local numRemovedElements = rcall("ZREM", parentPrefix .. "waiting-children", parentId)
|
|
175
|
+
if numRemovedElements == 1 then
|
|
176
|
+
if hard then -- remove parent in same queue
|
|
177
|
+
if parentPrefix == baseKey then
|
|
178
|
+
removeParentDependencyKey(parentKey, hard, nil, baseKey, nil)
|
|
179
|
+
removeJobKeys(parentKey)
|
|
180
|
+
if debounceId then
|
|
181
|
+
rcall("DEL", parentPrefix .. "de:" .. debounceId)
|
|
182
|
+
end
|
|
183
|
+
else
|
|
184
|
+
moveParentToWait(parentPrefix, parentId)
|
|
185
|
+
end
|
|
186
|
+
else
|
|
187
|
+
moveParentToWait(parentPrefix, parentId, true)
|
|
188
|
+
end
|
|
189
|
+
end
|
|
190
|
+
end
|
|
191
|
+
return true
|
|
192
|
+
end
|
|
193
|
+
else
|
|
194
|
+
local parentAttributes = rcall("HMGET", jobKey, "parentKey", "deid")
|
|
195
|
+
local missedParentKey = parentAttributes[1]
|
|
196
|
+
if( (type(missedParentKey) == "string") and missedParentKey ~= ""
|
|
197
|
+
and (rcall("EXISTS", missedParentKey) == 1)) then
|
|
198
|
+
local parentDependenciesKey = missedParentKey .. ":dependencies"
|
|
199
|
+
local result = rcall("SREM", parentDependenciesKey, jobKey)
|
|
200
|
+
if result > 0 then
|
|
201
|
+
local pendingDependencies = rcall("SCARD", parentDependenciesKey)
|
|
202
|
+
if pendingDependencies == 0 then
|
|
203
|
+
local parentId = getJobIdFromKey(missedParentKey)
|
|
204
|
+
local parentPrefix = getJobKeyPrefix(missedParentKey, parentId)
|
|
205
|
+
local numRemovedElements = rcall("ZREM", parentPrefix .. "waiting-children", parentId)
|
|
206
|
+
if numRemovedElements == 1 then
|
|
207
|
+
if hard then
|
|
208
|
+
if parentPrefix == baseKey then
|
|
209
|
+
removeParentDependencyKey(missedParentKey, hard, nil, baseKey, nil)
|
|
210
|
+
removeJobKeys(missedParentKey)
|
|
211
|
+
if parentAttributes[2] then
|
|
212
|
+
rcall("DEL", parentPrefix .. "de:" .. parentAttributes[2])
|
|
213
|
+
end
|
|
214
|
+
else
|
|
215
|
+
moveParentToWait(parentPrefix, parentId)
|
|
216
|
+
end
|
|
217
|
+
else
|
|
218
|
+
moveParentToWait(parentPrefix, parentId, true)
|
|
219
|
+
end
|
|
220
|
+
end
|
|
221
|
+
end
|
|
222
|
+
return true
|
|
223
|
+
end
|
|
224
|
+
end
|
|
225
|
+
end
|
|
226
|
+
return false
|
|
227
|
+
end
|
|
228
|
+
local function removeJob(prefix, jobId, parentKey, removeChildren)
|
|
229
|
+
local jobKey = prefix .. jobId;
|
|
230
|
+
removeParentDependencyKey(jobKey, false, parentKey, nil)
|
|
231
|
+
if removeChildren == "1" then
|
|
232
|
+
-- Check if this job has children
|
|
233
|
+
-- If so, we are going to try to remove the children recursively in deep first way because
|
|
234
|
+
-- if some job is locked we must exit with and error.
|
|
235
|
+
-- local countProcessed = rcall("HLEN", jobKey .. ":processed")
|
|
236
|
+
local processed = rcall("HGETALL", jobKey .. ":processed")
|
|
237
|
+
if (#processed > 0) then
|
|
238
|
+
for i = 1, #processed, 2 do
|
|
239
|
+
local childJobId = getJobIdFromKey(processed[i])
|
|
240
|
+
local childJobPrefix = getJobKeyPrefix(processed[i], childJobId)
|
|
241
|
+
removeJob(childJobPrefix, childJobId, jobKey, removeChildren)
|
|
242
|
+
end
|
|
243
|
+
end
|
|
244
|
+
local dependencies = rcall("SMEMBERS", jobKey .. ":dependencies")
|
|
245
|
+
if (#dependencies > 0) then
|
|
246
|
+
for i, childJobKey in ipairs(dependencies) do
|
|
247
|
+
-- We need to get the jobId for this job.
|
|
248
|
+
local childJobId = getJobIdFromKey(childJobKey)
|
|
249
|
+
local childJobPrefix = getJobKeyPrefix(childJobKey, childJobId)
|
|
250
|
+
removeJob(childJobPrefix, childJobId, jobKey, removeChildren)
|
|
251
|
+
end
|
|
252
|
+
end
|
|
253
|
+
local failed = rcall("HGETALL", jobKey .. ":failed")
|
|
254
|
+
if (#failed > 0) then
|
|
255
|
+
for i = 1, #failed, 2 do
|
|
256
|
+
local childJobId = getJobIdFromKey(failed[i])
|
|
257
|
+
local childJobPrefix = getJobKeyPrefix(failed[i], childJobId)
|
|
258
|
+
removeJob(childJobPrefix, childJobId, jobKey, removeChildren)
|
|
259
|
+
end
|
|
260
|
+
end
|
|
261
|
+
end
|
|
262
|
+
local prev = removeJobFromAnyState(prefix, jobId)
|
|
263
|
+
removeDeduplicationKey(prefix, jobKey)
|
|
264
|
+
if removeJobKeys(jobKey) > 0 then
|
|
265
|
+
local maxEvents = getOrSetMaxEvents(KEYS[2])
|
|
266
|
+
rcall("XADD", prefix .. "events", "MAXLEN", "~", maxEvents, "*", "event", "removed", "jobId", jobId, "prev",
|
|
267
|
+
prev)
|
|
268
|
+
end
|
|
269
|
+
end
|
|
270
|
+
local prefix = KEYS[1]
|
|
271
|
+
local jobId = ARGV[1]
|
|
272
|
+
local shouldRemoveChildren = ARGV[2]
|
|
273
|
+
local jobKey = prefix .. jobId
|
|
274
|
+
-- Check if the job belongs to a job scheduler and it is in delayed state.
|
|
275
|
+
if rcall("ZSCORE", prefix .. "delayed", jobId) and rcall("HGET", jobKey, "rjk") then
|
|
276
|
+
return -8 -- Return error code as the job is part of a job scheduler and is in delayed state.
|
|
277
|
+
end
|
|
278
|
+
if not isLocked(prefix, jobId, shouldRemoveChildren) then
|
|
279
|
+
removeJob(prefix, jobId, nil, shouldRemoveChildren)
|
|
280
|
+
return 1
|
|
281
|
+
end
|
|
282
|
+
return 0
|
|
283
|
+
`;
|
|
284
|
+
export const removeJob = {
|
|
285
|
+
name: 'removeJob',
|
|
286
|
+
content,
|
|
287
|
+
keys: 2,
|
|
288
|
+
};
|
|
289
|
+
//# sourceMappingURL=removeJob-2.js.map
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
const content = `--[[
|
|
2
|
+
Removes a repeatable job
|
|
3
|
+
Input:
|
|
4
|
+
KEYS[1] job schedulers key
|
|
5
|
+
KEYS[2] delayed jobs key
|
|
6
|
+
KEYS[3] events key
|
|
7
|
+
ARGV[1] job scheduler id
|
|
8
|
+
ARGV[2] prefix key
|
|
9
|
+
Output:
|
|
10
|
+
0 - OK
|
|
11
|
+
1 - Missing repeat job
|
|
12
|
+
Events:
|
|
13
|
+
'removed'
|
|
14
|
+
]]
|
|
15
|
+
local rcall = redis.call
|
|
16
|
+
-- Includes
|
|
17
|
+
--[[
|
|
18
|
+
Function to remove job keys.
|
|
19
|
+
]]
|
|
20
|
+
local function removeJobKeys(jobKey)
|
|
21
|
+
return rcall("DEL", jobKey, jobKey .. ':logs',
|
|
22
|
+
jobKey .. ':dependencies', jobKey .. ':processed', jobKey .. ':failed')
|
|
23
|
+
end
|
|
24
|
+
local jobSchedulerId = ARGV[1]
|
|
25
|
+
local prefix = ARGV[2]
|
|
26
|
+
local millis = rcall("ZSCORE", KEYS[1], jobSchedulerId)
|
|
27
|
+
if millis then
|
|
28
|
+
-- Delete next programmed job.
|
|
29
|
+
local delayedJobId = "repeat:" .. jobSchedulerId .. ":" .. millis
|
|
30
|
+
if(rcall("ZREM", KEYS[2], delayedJobId) == 1) then
|
|
31
|
+
removeJobKeys(prefix .. delayedJobId)
|
|
32
|
+
rcall("XADD", KEYS[3], "*", "event", "removed", "jobId", delayedJobId, "prev", "delayed")
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
if(rcall("ZREM", KEYS[1], jobSchedulerId) == 1) then
|
|
36
|
+
rcall("DEL", KEYS[1] .. ":" .. jobSchedulerId)
|
|
37
|
+
return 0
|
|
38
|
+
end
|
|
39
|
+
return 1
|
|
40
|
+
`;
|
|
41
|
+
export const removeJobScheduler = {
|
|
42
|
+
name: 'removeJobScheduler',
|
|
43
|
+
content,
|
|
44
|
+
keys: 3,
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=removeJobScheduler-3.js.map
|