Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@vendure/job-queue-plugin

Package Overview
Dependencies
Maintainers
1
Versions
147
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vendure/job-queue-plugin - npm Package Compare versions

Comparing version 1.3.0-beta.1 to 1.3.0

8

package.json
{
"name": "@vendure/job-queue-plugin",
"version": "1.3.0-beta.1",
"version": "1.3.0",
"license": "MIT",

@@ -27,4 +27,4 @@ "main": "package/index.js",

"@types/redis": "^2.8.28",
"@vendure/common": "^1.3.0-beta.1",
"@vendure/core": "^1.3.0-beta.1",
"@vendure/common": "^1.3.0",
"@vendure/core": "^1.3.0",
"bullmq": "^1.40.1",

@@ -35,3 +35,3 @@ "redis": "^3.0.2",

},
"gitHead": "e268234ffbbca155c7175cb0d7198f52b47c5707"
"gitHead": "ac851bb030d281e3fc31078d2e9d61620eae5b29"
}

@@ -15,2 +15,3 @@ import { Injector, Job, JobBufferStorageStrategy } from '@vendure/core';

private toJob;
private getAllBufferIds;
}

@@ -45,2 +45,3 @@ "use strict";

async bufferSize(bufferIds) {
const ids = (bufferIds === null || bufferIds === void 0 ? void 0 : bufferIds.length) ? bufferIds : await this.getAllBufferIds();
const result = {};

@@ -55,2 +56,3 @@ for (const id of bufferIds || []) {

async flush(bufferIds) {
const ids = (bufferIds === null || bufferIds === void 0 ? void 0 : bufferIds.length) ? bufferIds : await this.getAllBufferIds();
const result = {};

@@ -83,4 +85,16 @@ for (const id of bufferIds || []) {

}
async getAllBufferIds() {
const stream = this.redis.scanStream({
match: `${BUFFER_LIST_PREFIX}:*`,
});
const keys = await new Promise((resolve, reject) => {
const allKeys = [];
stream.on('data', _keys => allKeys.push(..._keys));
stream.on('end', () => resolve(allKeys));
stream.on('error', err => reject(err));
});
return keys.map(key => key.replace(`${BUFFER_LIST_PREFIX}:`, ''));
}
}
exports.RedisJobBufferStorageStrategy = RedisJobBufferStorageStrategy;
//# sourceMappingURL=redis-job-buffer-storage-strategy.js.map

@@ -50,2 +50,15 @@ import { Job } from '@vendure/core';

*
* @example
* ```TypeScript
* setRetries: (queueName, job) => {
* if (queueName === 'send-email') {
* // Override the default number of retries
* // for the 'send-email' job because we have
* // a very unreliable email service.
* return 10;
* }
* return job.retries;
* }
* ```
*
* @since 1.3.0

@@ -52,0 +65,0 @@ */

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc