diff options
| author | MeiMei <30769358+mei23@users.noreply.github.com> | 2021-05-08 18:56:21 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-08 18:56:21 +0900 |
| commit | 591a5c277cdf197f043e5b24743dbdb346e65c4f (patch) | |
| tree | b84126eec671a7a1f1172b472cd9143060357f00 /src/queue/processors/db/index.ts | |
| parent | Create get-index-stats.ts (diff) | |
| download | sharkey-591a5c277cdf197f043e5b24743dbdb346e65c4f.tar.gz sharkey-591a5c277cdf197f043e5b24743dbdb346e65c4f.tar.bz2 sharkey-591a5c277cdf197f043e5b24743dbdb346e65c4f.zip | |
Add queue types (#7504)
Diffstat (limited to 'src/queue/processors/db/index.ts')
| -rw-r--r-- | src/queue/processors/db/index.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/queue/processors/db/index.ts b/src/queue/processors/db/index.ts index 921cdf7ab1..b56b7bfa2c 100644 --- a/src/queue/processors/db/index.ts +++ b/src/queue/processors/db/index.ts @@ -1,4 +1,5 @@ import * as Bull from 'bull'; +import { DbJobData } from '@/queue/types'; import { deleteDriveFiles } from './delete-drive-files'; import { exportNotes } from './export-notes'; import { exportFollowing } from './export-following'; @@ -17,10 +18,10 @@ const jobs = { exportUserLists, importFollowing, importUserLists -} as any; +} as Record<string, Bull.ProcessCallbackFunction<DbJobData> | Bull.ProcessPromiseFunction<DbJobData>>; -export default function(dbQueue: Bull.Queue) { +export default function(dbQueue: Bull.Queue<DbJobData>) { for (const [k, v] of Object.entries(jobs)) { - dbQueue.process(k, v as any); + dbQueue.process(k, v); } } |