SpaceCat Task Processor is a Node.js service that processes messages from the AWS SQS queue SPACECAT-TASK-PROCESSOR-JOBS
. Based on the type
field in each message, it dispatches the message to the appropriate handler for processing various site-related tasks.
- Receives and processes messages from SQS
- Supports multiple task types via modular handlers
- Handlers for audit status, demo URL preparation, and disabling imports/audits
- Extensible and easy to add new handlers
- opportunity-status-processor: Checks and reports status audits for a site
- disable-import-audit-processor: Disables specified imports and audits for a site
- demo-url-processor: Prepares and shares a demo URL for a site
- Clone the repository
- Install dependencies:
npm install
- Configure AWS credentials and environment variables as needed
- The service is designed to run as a serverless function or background worker.
- It listens for messages on the SQS queue and processes them automatically.
- To run tests:
npm test
- To lint code:
npm run lint
To add a new handler:
- Create a new folder in
src/
for your handler. - Export your handler function.
- Add it to the handler mapping in
src/index.js
.
For more details, see the documentation in src/README.md
.
$ npm install @adobe/spacecat-task-processor
See the API documentation.
$ npm install
$ npm test
$ npm run lint
Task processor consumes the SPACECAT-TASK-PROCESSOR-JOBS
queue, performs the requested task and sends a notification to slack as needed.
Expected message body format in SPACECAT-TASK-PROCESSOR-JOBS
is:
{
"type": "string",
"siteId": "string"
}