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.4.6 to 1.4.7

2

package.json
{
"name": "@cap-js-community/event-queue",
"version": "1.4.6",
"version": "1.4.7",
"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.",

@@ -5,0 +5,0 @@ "main": "src/index.js",

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

const { broadcastEvent } = require("./redis/redisPub");
const redisPub = require("./redis/redisPub");
const config = require("./config");

@@ -29,3 +29,3 @@

const eventQueuePublishEvents = req.tx._.eventQueuePublishEvents;
const data = Array.isArray(req.data) ? req.data : [req.data];
const data = Array.isArray(req.query.INSERT.entries) ? req.query.INSERT.entries : [req.query.INSERT.entries];
const eventCombinations = Object.keys(

@@ -50,3 +50,3 @@ data.reduce((result, event) => {

broadcastEvent(req.tenant, events).catch((err) => {
redisPub.broadcastEvent(req.tenant, events).catch((err) => {
cds.log(COMPONENT_NAME).error("db handler failure during broadcasting event", err, {

@@ -53,0 +53,0 @@ tenant: req.tenant,

@@ -30,5 +30,3 @@ "use strict";

});
this.#eventsByTenants[tenantId] ??= {};
const timeoutId = setTimeout(() => {
delete this.#eventsByTenants[tenantId][timeoutId];
setTimeout(() => {
delete this.#scheduledEvents[key];

@@ -44,8 +42,5 @@ redisPub.broadcastEvent(tenantId, { type, subType }).catch((err) => {

}, relative).unref();
this.#eventsByTenants[tenantId][timeoutId] = true;
}
clearForTenant(tenantId) {
Object.values(this.#eventsByTenants[tenantId]).forEach((timeoutId) => clearTimeout(timeoutId));
}
clearForTenant() {}

@@ -52,0 +47,0 @@ calculateOffset(type, subType, startAfter) {

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