fix: replace webhook endpoint with a bullmq job

This commit is contained in:
Hongbo Wu
2024-02-01 19:50:59 +08:00
parent 5e49131fc2
commit 25e374f6ff
5 changed files with 106 additions and 2 deletions

View File

@ -15,6 +15,7 @@ import { SnakeNamingStrategy } from 'typeorm-naming-strategies'
import { appDataSource } from './data_source'
import { env } from './env'
import { bulkAction, BULK_ACTION_JOB_NAME } from './jobs/bulk_action'
import { CALL_WEBHOOK_JOB_NAME, callWebhook } from './jobs/call_webhook'
import { findThumbnail, THUMBNAIL_JOB } from './jobs/find_thumbnail'
import { refreshAllFeeds } from './jobs/rss/refreshAllFeeds'
import { refreshFeed } from './jobs/rss/refreshFeed'
@ -87,6 +88,8 @@ export const createWorker = (connection: ConnectionOptions) =>
return syncReadPositionsJob(job.data)
case BULK_ACTION_JOB_NAME:
return bulkAction(job.data)
case CALL_WEBHOOK_JOB_NAME:
return callWebhook(job.data)
}
},
{