diff options
| author | syuilo <4439005+syuilo@users.noreply.github.com> | 2025-04-19 14:00:38 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-19 14:00:38 +0900 |
| commit | 7b38806413b84bd20070f3c81b899e5b890b1a8b (patch) | |
| tree | 2385b32546d410ff2e5e208793f7ad82ad6623ab /packages/backend/src/queue/const.ts | |
| parent | fix(storybook): implement missing stories (#15862) (diff) | |
| download | sharkey-7b38806413b84bd20070f3c81b899e5b890b1a8b.tar.gz sharkey-7b38806413b84bd20070f3c81b899e5b890b1a8b.tar.bz2 sharkey-7b38806413b84bd20070f3c81b899e5b890b1a8b.zip | |
feat: Job queue inspector (#15856)
* wip
* wip
* Update job-queue.vue
* wip
* wip
* Update job-queue.vue
* wip
* Update job-queue.vue
* wip
* Update QueueService.ts
* Update QueueService.ts
* Update QueueService.ts
* Update job-queue.vue
* wip
* wip
* wip
* Update job-queue.vue
* wip
* Update MkTl.vue
* wip
* Update index.vue
* wip
* wip
* Update MkTl.vue
* 🎨
* jobs search
* wip
* Update job-queue.vue
* wip
* wip
* Update job-queue.vue
* Update job-queue.vue
* Update job-queue.vue
* Update job-queue.vue
* wip
* Update job-queue.job.vue
* wip
* wip
* wip
* Update MkCode.vue
* wip
* Update job-queue.job.vue
* wip
* Update job-queue.job.vue
* Update misskey-js.api.md
* Update CHANGELOG.md
* Update job-queue.job.vue
Diffstat (limited to 'packages/backend/src/queue/const.ts')
| -rw-r--r-- | packages/backend/src/queue/const.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/packages/backend/src/queue/const.ts b/packages/backend/src/queue/const.ts index 67f689b618..7e146a7e03 100644 --- a/packages/backend/src/queue/const.ts +++ b/packages/backend/src/queue/const.ts @@ -3,6 +3,7 @@ * SPDX-License-Identifier: AGPL-3.0-only */ +import { MetricsTime } from 'bullmq'; import { Config } from '@/config.js'; import type * as Bull from 'bullmq'; @@ -27,3 +28,12 @@ export function baseQueueOptions(config: Config, queueName: typeof QUEUE[keyof t prefix: config.redisForJobQueue.prefix ? `${config.redisForJobQueue.prefix}:queue:${queueName}` : `queue:${queueName}`, }; } + +export function baseWorkerOptions(config: Config, queueName: typeof QUEUE[keyof typeof QUEUE]): Bull.WorkerOptions { + return { + ...baseQueueOptions(config, queueName), + metrics: { + maxDataPoints: MetricsTime.ONE_WEEK, + }, + }; +} |