7.2.6 • Published 9 months ago

vendure-plugin-google-cloud-tasks v7.2.6

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

Google Cloud Tasks Vendure plugin

Vendure version

Plugin for using Vendure worker with Google Cloud Tasks. This plugin will show ending, successful and failed jobs in the admin UI under sytem/jobs, but not running jobs. Only jobs of the past 7 days are kept in the DB.

Getting started

Plugin setup

  1. yarn add vendure-plugin-google-cloud-tasks
  2. Remove DefaultJobQueuePlugin from your vendure-config. Add this plugin to your vendure-config.ts:
import { CloudTasksPlugin } from 'vendure-plugin-google-cloud-tasks';

plugins: [
  CloudTasksPlugin.init({
    // Must reachable by Google Cloud Task. Messages are pushed to this endpoint
    taskHandlerHost: 'https://your-public-host/',
    projectId: 'your-google-project-id',
    // Region where the taskqueue should be created
    location: 'europe-west1',
    // Used to prevent unauithorized requests to your public endpoint
    authSecret: 'some-secret-to-authenticate-incoming-messages',
    /**
     *  Used to distinguish taskQueues within the same
     *  Google Project (if you have OTAP environments in the same project for example)
     *  This suffix will be appended to the queue name: "send-email-plugin-test"
     */
    queueSuffix: 'plugin-test',
    // Default amount of retries when no job.retries is given
    defaultJobRetries: 15,
    // The amount of retries when a job fails to be pushed to the queue
    createTaskRetries: 3,
  }),
];
  1. Start the Vendure server, log in to the admin dashboard and trigger a reindex job via Products > (cog icon) > reindex to test the Cloud Tasks Plugin.

Clear settled jobs

You can call the endpoint /cloud-tasks/clear-settled-jobs with the secret as Auth header to clear settled jobs:

curl -H "Authorization: Bearer some-secret-to-authenticate-cloud-tasks" "http://localhost:3050/cloud-tasks/clear-settled-jobs"

Overview

Alt text

(Use this to edit the diagram on plantuml.com: //www.plantuml.com/plantuml/png/jL0zJyCm4DtzAzu8Kf2wi7H0HHsec4h9ZanyQGqN6tntLFdtEAb49If6Dkjz-DvxAr5Vr0PsRitPGklbNHxpwvEHqRCMhxGVSNE7X_NsvNC2bxWF0LK2pPWHzyDDmlCt6vy2KrbYQtB0MtLyHOzDssxTXUWFv_o8QO_UHwRGG38AQHbn5NjuLHe-LC3KQuEi1oh7A0JE9uSLWfSfx8wwNCBrvU5VtNQaLXBgAcg2syMYmJm5Zf4PbWALogM0g4X4uPIc9lpl4GXYNKSYlJ6FpLJntCkv5QLW0ty3)

7.1.3

9 months ago

7.1.2

9 months ago

7.1.1

10 months ago

7.1.0

10 months ago

7.2.6

9 months ago

7.2.5

9 months ago

7.0.0-v2.1

11 months ago

7.0.1

10 months ago

7.0.0-v1.1

10 months ago

5.5.0

1 year ago

5.6.7

1 year ago

4.10.0

1 year ago

5.4.0

1 year ago

5.0.1

1 year ago

6.0.0

12 months ago

5.10.1

12 months ago

7.0.0

12 months ago

3.21.0

2 years ago

4.1.0

2 years ago

4.0.1

2 years ago

4.0.0

2 years ago

4.3.0

1 year ago

3.11.4

2 years ago

3.16.1

2 years ago

3.16.0

2 years ago

3.11.5

2 years ago

3.13.0

2 years ago

3.8.1

2 years ago

3.3.1

2 years ago

3.5.3

2 years ago

3.7.0

2 years ago

3.5.2

2 years ago

3.5.0

2 years ago

3.0.4

2 years ago

2.5.0

2 years ago

2.4.0

2 years ago

2.7.0

2 years ago

3.0.0

2 years ago

2.2.3

2 years ago

1.3.2

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

2.2.1

2 years ago

2.0.3

2 years ago

2.2.0

2 years ago

2.1.1

2 years ago

2.2.2

2 years ago

2.0.4

2 years ago

2.0.1

2 years ago

1.2.6

2 years ago

1.2.4

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.2.0

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago