Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(appStore, subscriptionManager, queryManager) {
this.appStore = appStore;
this._itemsMap = observable.map({});
this.subscriptionManager = subscriptionManager;
this.queryManager = queryManager;
this.subscriptionManager.subscribeToAllSessions(
this.handleSubscription
);
let bufferSize = this.bufferSize;
const stop = chunkProcessor(this.logsBuffer, chunk => {
let itemsCount = this.logs.length + chunk.length;
let offset = itemsCount > bufferSize ? itemsCount - bufferSize : 0;
this.logs.replace(
this.logs.slice(offset).concat(chunk)
)
this.logsBuffer.clear();
}, 200, bufferSize)
}