v2.4.2

cmstosocial

Event-driven CMS-to-social syndication worker. It has no deployed HTTP routes; production traffic arrives through SNS-to-SQS delivery from the purge post-transition topic.

FieldValue
Serverless servicedrive-api-cmstosocial
Runtimenodejs20.x, arm64
Regionap-southeast-2
Deployed HTTP operations0
Local worker harnesses0
OpenAPI/openapi/cmstosocial.yaml

Deployed routes

No deployed HTTP routes. This service is event-driven.

Behaviour notes

  • queueProcessor consumes cmstosocialQueue with batchSize: 1, reservedConcurrency: 1, and a 300 second timeout.
  • cmstosocialQueue subscribes to the purge service post-transition SNS topic and filters message attributes to postType values news, caradvice, and reviews.
  • The worker skips non-new post updates, enriches post data from WPGraphQL, generates copy through @caradvice/drive-ai using OpenRouter/Portkey config, and creates or updates Brandwatch Facebook drafts.
  • DynamoDB table socialPublishJobs stores idempotency/status records keyed by wordpress#{postType}#{postId} and version#{modifiedGmt}.
  • ENABLE_EXTERNAL_APIS=true opt-in is required for real external calls in non-prod. Prod calls real LLM/Brandwatch APIs by default.
  • dlqProcessor consumes cmstosocialDLQ, sends Slack notifications according to SLACK_LOG_LEVEL, and acknowledges terminal failures.

Source map

  • Routes and triggers: services/cmstosocial/serverless.yml
  • Worker: services/cmstosocial/functions/queueProcessor.ts
  • DLQ handler: services/cmstosocial/functions/dlqProcessor.ts
  • Message shape: services/cmstosocial/types/index.ts
  • Utility clients: services/cmstosocial/util/
Esc