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

@cap-js-community/event-queue

Package Overview
Dependencies
Maintainers
7
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cap-js-community/event-queue - npm Package Compare versions

Comparing version 1.2.3 to 1.2.4

4

package.json
{
"name": "@cap-js-community/event-queue",
"version": "1.2.3",
"description": "An event queue that enables secure transactional processing of asynchronous events, featuring instant event processing with Redis Pub/Sub and load distribution across all application instances.",
"version": "1.2.4",
"description": "An event queue that enables secure transactional processing of asynchronous and periodic events, featuring instant event processing with Redis Pub/Sub and load distribution across all application instances.",
"main": "src/index.js",

@@ -6,0 +6,0 @@ "files": [

@@ -24,3 +24,3 @@ "use strict";

let serviceBindingCache = {};
let serviceBindingCache = null;

@@ -704,9 +704,12 @@ class EventQueueProcessorBase {

async #getServiceBindings() {
if (serviceBindingCache && serviceBindingCache.exipreTs >= Date.now()) {
return serviceBindingCache.value;
if (!(serviceBindingCache && serviceBindingCache.expireTs >= Date.now())) {
const mtxServiceManager = require("@sap/cds-mtxs/srv/plugins/hana/srv-mgr");
serviceBindingCache = {
expireTs: Date.now() + 10 * 60 * 1000,
value: mtxServiceManager.getAll().catch(() => {
serviceBindingCache = null;
}),
};
}
const mtxServiceManager = require("@sap/cds-mtxs/srv/plugins/hana/srv-mgr");
serviceBindingCache.value = await mtxServiceManager.getAll();
serviceBindingCache.exipreTs = Date.now() + 10 * 60 * 1000;
return serviceBindingCache.value;
return await serviceBindingCache.value;
}

@@ -713,0 +716,0 @@

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