@cap-js-community/event-queue
Advanced tools
Comparing version 1.2.2 to 1.2.3
{ | ||
"name": "@cap-js-community/event-queue", | ||
"version": "1.2.2", | ||
"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.", | ||
@@ -45,3 +45,3 @@ "main": "src/index.js", | ||
"dependencies": { | ||
"redis": "4.6.12", | ||
"redis": "4.6.13", | ||
"verror": "1.10.1", | ||
@@ -48,0 +48,0 @@ "yaml": "2.3.4" |
@@ -24,2 +24,4 @@ "use strict"; | ||
let serviceBindingCache = {}; | ||
class EventQueueProcessorBase { | ||
@@ -677,6 +679,4 @@ #eventsWithExceededTries = []; | ||
try { | ||
const mtxServiceManager = require("@sap/cds-mtxs/srv/plugins/hana/srv-mgr"); | ||
const schemaPromise = tx.run("SELECT CURRENT_SCHEMA FROM DUMMY"); | ||
const serviceManagerBindingsPromise = mtxServiceManager.getAll(); | ||
const [schema, serviceManagerBindings] = await Promise.allSettled([schemaPromise, serviceManagerBindingsPromise]); | ||
const [schema, serviceManagerBindings] = await Promise.allSettled([schemaPromise, this.#getServiceBindings()]); | ||
if (schema.reason) { | ||
@@ -687,3 +687,3 @@ errorHandler(schema.reason); | ||
if (serviceManagerBindings.reason) { | ||
errorHandler(schema.reason); | ||
errorHandler(serviceManagerBindings.reason); | ||
return; | ||
@@ -705,2 +705,12 @@ } | ||
async #getServiceBindings() { | ||
if (serviceBindingCache && serviceBindingCache.exipreTs >= Date.now()) { | ||
return serviceBindingCache.value; | ||
} | ||
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; | ||
} | ||
async #selectLastSuccessfulPeriodicTimestamp() { | ||
@@ -707,0 +717,0 @@ const entry = await SELECT.one |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
153455
3732
+ Added@redis/client@1.5.14(transitive)
+ Addedredis@4.6.13(transitive)
- Removed@redis/client@1.5.13(transitive)
- Removedredis@4.6.12(transitive)
Updatedredis@4.6.13