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

dpool

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dpool - npm Package Compare versions

Comparing version 0.1.3 to 0.1.4

2

index.js

@@ -1,2 +0,2 @@

const dpool = require("./src/dpool.js");
const { dpool } = require("./src/dpool.js");
module.exports = { dpool };
{
"name": "dpool",
"repository": "git://github.com/ryanbethel/dpool.git",
"version": "0.1.3",
"version": "0.1.4",
"description": "Serverless pooling function for relational databases, using a DynamoDB table as a queue",

@@ -6,0 +6,0 @@ "main": "index.js",

@@ -56,2 +56,3 @@ let arc = require("@architect/functions");

queryLimit,
poolTable,
});

@@ -75,5 +76,5 @@

dynamo,
{ lockId, nowMs, poolName, poolSize, minWaitQueueMs, waitVarianceMs, maxRetries }
{ lockId, nowMs, poolName, poolSize, minWaitQueueMs, waitVarianceMs, maxRetries, poolTable }
) {
let maxTimeToQueue = await checkQueue(dynamo, { lockId, nowMs, poolName, poolSize });
let maxTimeToQueue = await checkQueue(dynamo, { lockId, nowMs, poolName, poolSize, poolTable });
let retries = 0;

@@ -88,7 +89,7 @@ while (maxTimeToQueue > Date.now()) {

);
maxTimeToQueue = await checkQueue(dynamo, { lockId, nowMs, poolName, poolSize });
maxTimeToQueue = await checkQueue(dynamo, { lockId, nowMs, poolName, poolSize, poolTable });
}
}
async function checkQueue(dynamo, { queryLimit, poolName, poolSize, nowMs, lockId }) {
async function checkQueue(dynamo, { queryLimit, poolName, poolSize, nowMs, lockId, poolTable }) {
let poolQuery = await dynamo[poolTable].query({

@@ -95,0 +96,0 @@ ExpressionAttributeNames: { "#p": "pk" },

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