diff --git a/src/in-house-bot/jobs/index.ts b/src/in-house-bot/jobs/index.ts index 3788c495f..ce488e5c6 100644 --- a/src/in-house-bot/jobs/index.ts +++ b/src/in-house-bot/jobs/index.ts @@ -108,16 +108,16 @@ export const checkFailedSeals:Executor = async ({ job, components }) => { return await components.bot.seals.handleFailures({ gracePeriod }) } -export const documentChecker:Executor = async ({ job, components }) => { - const { logger, documentChecker } = components - if (!documentChecker) { - logger.debug('document checker not set up') - return - } - - // // document checker rate-limits to 1/min - return await documentChecker.checkPending({ limit: 1 }) -} +// export const documentChecker:Executor = async ({ job, components }) => { +// const { logger, documentChecker } = components +// if (!documentChecker) { +// logger.debug('document checker not set up') +// return +// } + +// // // document checker rate-limits to 1/min +// return await documentChecker.checkPending({ limit: 1 }) +// } // export const cleanupTmpSNSTopics:Executor = async ({ job, components }) => { // const { bot, logger } = components diff --git a/src/in-house-bot/lambda/http/documentChecker-webhook.ts b/src/in-house-bot/lambda/http/documentChecker-webhook.ts index 590c4e374..8f7f3a344 100644 --- a/src/in-house-bot/lambda/http/documentChecker-webhook.ts +++ b/src/in-house-bot/lambda/http/documentChecker-webhook.ts @@ -21,11 +21,15 @@ lambda.use(async (ctx) => { throw new Errors.HttpError(404, 'not found') } - const { event } = ctx + const { body } = ctx.event + let evt = JSON.parse(body.toString()) + try { - await documentChecker.handleVerificationEvent(event) + await documentChecker.handleVerificationEvent(evt) } catch (err) { - lambda.logger.error('failed to handle documentChecker webhook call', err) + debugger + // lambda.logger.error('failed to handle documentChecker webhook call', err) + ctx.body = `failed to handle documentChecker webhook call: ${err.name}` ctx.status = 500 ctx.error = new Error('failed') }