Skip to content

Commit 6df3989

Browse files
authoredJun 16, 2017
Optional compression (#35)
* parameterize compression flag * make compression flaggable
1 parent 2cdc099 commit 6df3989

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed
 

‎lib/client/signalflow/request_manager.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,6 @@ function RequestManager(endPoint) {
234234
}
235235

236236
function streamComputationWebsocket(params, requestId, cb, requestType, isRetryPatchMode) {
237-
//hack, obviously
238237
if (!wsConnectionOpen) {
239238
pendingWSRequests.push({
240239
params: params,
@@ -243,7 +242,6 @@ function RequestManager(endPoint) {
243242
requestType: requestType,
244243
isRetryPatchMode: isRetryPatchMode});
245244
} else {
246-
params.compress = conf.COMPRESS_SIGNALFLOW_WEBSOCKET_MESSAGES;
247245
addComputation(params, requestId, transports.WEBSOCKET, cb, requestType, isRetryPatchMode);
248246
var jobObject = getJobObject(params, requestType);
249247
jobObject.type = requestType;
@@ -330,6 +328,7 @@ function RequestManager(endPoint) {
330328
console.error('Too many active jobs open! Stop one of the returned IDs to proceed. ');
331329
return Object.keys(knownComputations);
332330
}
331+
params.compress = typeof params.compress === 'undefined' ? conf.COMPRESS_SIGNALFLOW_WEBSOCKET_MESSAGES : params.compress;
333332
var requestId = overrideRequestId || getRequestIdAndIncrement();
334333
//todo : deep copy params?
335334

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "signalfx",
3-
"version": "5.0.0",
3+
"version": "5.0.1",
44
"description": "Node.js client library for SignalFx",
55
"homepage": "https://signalfx.com",
66
"repository": "https://github.com/signalfx/signalfx-nodejs",

0 commit comments

Comments
 (0)
Please sign in to comment.