@zingle/esbulker
Advanced tools
Comparing version 0.0.1-beta3 to 0.0.1
const {EventEmitter} = require("events"); | ||
const {post} = require("./http"); | ||
const fib = require("./fib"); | ||
const sleep = require("./sleep"); | ||
const {assign, freeze} = Object; | ||
@@ -316,3 +315,3 @@ const {round, min} = Math; | ||
endpoint.emit("backoff", Number(backoff.next()), chunks); | ||
await sleep(min(maxDelay, backoff)); | ||
await new Promise(ok => setTimeout(ok, min(maxDelay, backoff))); | ||
} | ||
@@ -319,0 +318,0 @@ |
@@ -1,2 +0,1 @@ | ||
const sleep = require("./sleep"); | ||
const {max} = Math; | ||
@@ -40,3 +39,3 @@ | ||
// sleep for a bit before checking for recovery | ||
await new Promise(resolve => setTimeout(resolve, downtime)); | ||
await new Promise(ok => setTimeout(ok, downtime)); | ||
@@ -68,3 +67,3 @@ // check each endpoint for recovery | ||
while (endpoint.paused && wait > RECOVER_WAIT) { | ||
await sleep(wait); | ||
await new Promise(ok => setTimeout(ok, wait)); | ||
@@ -71,0 +70,0 @@ try { |
{ | ||
"name": "@zingle/esbulker", | ||
"version": "0.0.1-beta3", | ||
"version": "0.0.1", | ||
"description": "Elasticsearch bulking proxy", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
47318
20
1311