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

rx-jupyter

Package Overview
Dependencies
Maintainers
16
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rx-jupyter - npm Package Compare versions

Comparing version 5.3.4 to 5.4.0

21

lib/kernels.js

@@ -8,3 +8,2 @@ "use strict";

const ajax_1 = require("rxjs/ajax");
const operators_1 = require("rxjs/operators");
const webSocket_1 = require("rxjs/webSocket");

@@ -118,22 +117,2 @@ const url_join_1 = __importDefault(require("url-join"));

});
wsSubject.pipe(operators_1.retryWhen(error$ => {
// Keep track of how many times we've already re-tried
let counter = 0;
const maxRetries = 100;
return error$.pipe(operators_1.tap(e => {
counter++;
// This will only retry on error when it's a close event that is not
// from a .complete() of the websocket subject
if (counter > maxRetries || e instanceof Event === false) {
console.error(`bubbling up Error on websocket after retrying ${counter} times out of ${maxRetries}`, e);
throw e;
}
else {
// We'll retry at this point
console.log("attempting to retry kernel connection after error", e);
}
}), operators_1.delay(1000));
}),
// The websocket subject is multicast and we need the retryWhen logic to retain that property
operators_1.share());
// Create a subject that does some of the handling inline for the session

@@ -140,0 +119,0 @@ // and ensuring it's serialized

4

package.json
{
"name": "rx-jupyter",
"version": "5.3.4",
"version": "5.4.0",
"description": "RxJS 5 bindings for the Jupyter Notebook API",

@@ -34,3 +34,3 @@ "main": "lib/index.js",

},
"gitHead": "3054fe966bd280c9b5d3ec40e0767f756a2a0cc1"
"gitHead": "758bd220e8f30a21306fce5172caa83d881f446b"
}
import { Subject, Subscriber } from "rxjs";
import { ajax } from "rxjs/ajax";
import { delay, retryWhen, share, tap } from "rxjs/operators";
import { webSocket } from "rxjs/webSocket";

@@ -154,31 +153,2 @@ import urljoin from "url-join";

wsSubject.pipe(
retryWhen(error$ => {
// Keep track of how many times we've already re-tried
let counter = 0;
const maxRetries = 100;
return error$.pipe(
tap(e => {
counter++;
// This will only retry on error when it's a close event that is not
// from a .complete() of the websocket subject
if (counter > maxRetries || e instanceof Event === false) {
console.error(
`bubbling up Error on websocket after retrying ${counter} times out of ${maxRetries}`,
e
);
throw e;
} else {
// We'll retry at this point
console.log("attempting to retry kernel connection after error", e);
}
}),
delay(1000)
);
}),
// The websocket subject is multicast and we need the retryWhen logic to retain that property
share()
);
// Create a subject that does some of the handling inline for the session

@@ -185,0 +155,0 @@ // and ensuring it's serialized

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