aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/job-queue/handlers
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/job-queue/handlers')
-rw-r--r--server/lib/job-queue/handlers/actor-keys.ts20
1 files changed, 20 insertions, 0 deletions
diff --git a/server/lib/job-queue/handlers/actor-keys.ts b/server/lib/job-queue/handlers/actor-keys.ts
new file mode 100644
index 000000000..8da549640
--- /dev/null
+++ b/server/lib/job-queue/handlers/actor-keys.ts
@@ -0,0 +1,20 @@
1import * as Bull from 'bull'
2import { generateAndSaveActorKeys } from '@server/lib/activitypub/actor'
3import { ActorModel } from '@server/models/activitypub/actor'
4import { ActorKeysPayload } from '@shared/models'
5import { logger } from '../../../helpers/logger'
6
7async function processActorKeys (job: Bull.Job) {
8 const payload = job.data as ActorKeysPayload
9 logger.info('Processing email in job %d.', job.id)
10
11 const actor = await ActorModel.load(payload.actorId)
12
13 await generateAndSaveActorKeys(actor)
14}
15
16// ---------------------------------------------------------------------------
17
18export {
19 processActorKeys
20}