Comparing version 0.1.3 to 0.1.4
@@ -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" }, |
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
10374
119