Skip to content

SpaceCat Task Processor for processing tasks to be used in async processes such as Step functions

License

Apache-2.0, Apache-2.0 licenses found

Licenses found

Apache-2.0
LICENSE
Apache-2.0
LICENSE.txt
Notifications You must be signed in to change notification settings

adobe/spacecat-task-processor

SpaceCat Task Processor

Overview

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.

Features

  • 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

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

Setup

  1. Clone the repository
  2. Install dependencies:
    npm install
  3. Configure AWS credentials and environment variables as needed

Usage

  • 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.

Development

  • To run tests:
    npm test
  • To lint code:
    npm run lint

Extending

To add a new handler:

  1. Create a new folder in src/ for your handler.
  2. Export your handler function.
  3. Add it to the handler mapping in src/index.js.

For more details, see the documentation in src/README.md.

Status

codecov CircleCI GitHub license GitHub issues LGTM Code Quality Grade: JavaScript semantic-release

Installation

$ npm install @adobe/spacecat-task-processor

Usage

See the API documentation.

Development

Build

$ npm install

Test

$ npm test

Lint

$ npm run lint

Message Body Formats

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"
}

About

SpaceCat Task Processor for processing tasks to be used in async processes such as Step functions

Resources

License

Apache-2.0, Apache-2.0 licenses found

Licenses found

Apache-2.0
LICENSE
Apache-2.0
LICENSE.txt

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •