blob: e4f6c94a57acf32fd9098828d55c367519314505 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
import { JobScheduler, JobHandler } from '../job-scheduler'
import * as activitypubHttpBroadcastHandler from './activitypub-http-broadcast-handler'
import * as activitypubHttpUnicastHandler from './activitypub-http-unicast-handler'
import { JobCategory } from '../../../../shared'
type ActivityPubHttpPayload = {
uris: string[]
signatureAccountId: number
body: any
}
const jobHandlers: { [ handlerName: string ]: JobHandler<ActivityPubHttpPayload, void> } = {
activitypubHttpBroadcastHandler,
activitypubHttpUnicastHandler
}
const jobCategory: JobCategory = 'activitypub-http'
const activitypubHttpJobScheduler = new JobScheduler(jobCategory, jobHandlers)
export {
ActivityPubHttpPayload,
activitypubHttpJobScheduler
}
|