Compare commits
2 Commits
102ab08f74
...
69a2cf4eac
Author | SHA1 | Date | |
---|---|---|---|
69a2cf4eac | |||
19e03cf360 |
@ -1,11 +1,14 @@
|
|||||||
import { NDKEvent } from '@nostr-dev-kit/ndk'
|
import { NDKEvent } from '@nostr-dev-kit/ndk'
|
||||||
import { validateJobRequest } from '../validations/index.js'
|
import { validateJobRequest } from '../validations/index.js'
|
||||||
import { inProgress } from '../jobs/reactions/in-progress.js'
|
import { inProgress } from '../jobs/reactions/in-progress.js'
|
||||||
|
import { log } from '../main.js'
|
||||||
|
|
||||||
export async function onNewSummarizationJob(event: NDKEvent): Promise<void> {
|
export async function onNewSummarizationJob(event: NDKEvent): Promise<void> {
|
||||||
console.log('New summarization job')
|
console.log('New summarization job')
|
||||||
|
|
||||||
await validateJobRequest(event)
|
await validateJobRequest(event).catch((err) =>
|
||||||
|
log(`Job validation error: `, err)
|
||||||
|
)
|
||||||
|
|
||||||
inProgress(event)
|
inProgress(event).catch((err) => log('Processing event error: ', err))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user