diff --git a/infrastructure/corpus-scheduler-lambda/src/corpusSchedulerLambda.ts b/infrastructure/corpus-scheduler-lambda/src/corpusSchedulerLambda.ts index a22ac26f..6af76069 100644 --- a/infrastructure/corpus-scheduler-lambda/src/corpusSchedulerLambda.ts +++ b/infrastructure/corpus-scheduler-lambda/src/corpusSchedulerLambda.ts @@ -24,8 +24,9 @@ export class CorpusSchedulerSQSLambda extends Construct { 'corpus-scheduler-sqs-lambda', { name: `${config.prefix}-SQS`, - // set batchSize to something reasonable - batchSize: 20, + // batch size is 1 so SQS doesn't get smart and try to combine them + // (a combined message will mean a skipped candidate set from ML) + batchSize: 1, batchWindow: 60, sqsQueue: { visibilityTimeoutSeconds: 150, diff --git a/lambdas/corpus-scheduler-lambda/src/config.ts b/lambdas/corpus-scheduler-lambda/src/config.ts index 83a0595d..8cc960cc 100644 --- a/lambdas/corpus-scheduler-lambda/src/config.ts +++ b/lambdas/corpus-scheduler-lambda/src/config.ts @@ -16,7 +16,7 @@ const config = { region: process.env.REGION || 'us-east-1', }, AdminApi: isDev - ? process.env.ADMIN_API_URI || 'http://localhost:4027' + ? process.env.ADMIN_API_URI || 'https://admin-api.getpocket.dev' : process.env.ADMIN_API_URI || 'https://admin-api.getpocket.com', jwt: { key: process.env.JWT_KEY || 'CorpusSchedulerLambda/Dev/JWT_KEY',