PubSubJobQueueStrategy
PubSubJobQueueStrategy
This JobQueueStrategy uses Google Cloud Pub/Sub to implement a job queue for Vendure. It should not be used alone, but as part of the PubSubPlugin.
Note: To use this strategy, you need to manually install the @google-cloud/pubsub
package:
npm install
```ts title="Signature"
class PubSubJobQueueStrategy extends InjectableJobQueueStrategy implements JobQueueStrategy {
init(injector: Injector) => ;
destroy() => ;
add(job: Job<Data>) => Promise<Job<Data>>;
start(queueName: string, process: (job: Job<Data>) => Promise<any>) => ;
stop(queueName: string, process: (job: Job<Data>) => Promise<any>) => ;
}
-
Extends:
InjectableJobQueueStrategy
-
Implements:
JobQueueStrategy