Skip to content

Commit 27ab161

Browse files
Daniel Baticaclaude
andcommitted
feat: pass opportunityId to assess-urls worker for precheck persistence
Include opportunityId in SQS message for assess-urls action to enable worker to fetch and update suggestion entities with precheck results, preventing data loss from async Lambda invocations. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 285d3aa commit 27ab161

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/controllers/suggestions.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -970,14 +970,14 @@ function SuggestionsController(ctx, sqs, env) {
970970
return badRequest(`Handler is not enabled for site ${site.getId()} autofix type ${opportunity.getType()}`);
971971
}
972972
const { AUTOFIX_JOBS_QUEUE: queueUrl } = env;
973-
// Intentionally omit opportunityId: worker uses context differently for URL-based assessments
974973
await sqs.sendMessage(queueUrl, {
975974
siteId,
975+
opportunityId,
976976
action: 'assess-urls',
977977
pages,
978978
...(precheckOnly === true && { precheckOnly: true }),
979979
});
980-
return accepted({ message: 'Assess-urls job queued', siteId, pagesCount: pages.length });
980+
return accepted({ message: 'Assess-urls job queued', siteId, opportunityId, pagesCount: pages.length });
981981
}
982982

983983
// suggestion-based flow (assess, fix, etc.)

0 commit comments

Comments
 (0)