From 0b95e42651be5530587c0b16bbc995ec75554dd9 Mon Sep 17 00:00:00 2001 From: Hemant Date: Mon, 14 Aug 2023 17:26:43 +0530 Subject: [PATCH] Added function to restart execution with new ws connection. --- index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/index.js b/index.js index ed3e102..f01a891 100644 --- a/index.js +++ b/index.js @@ -405,6 +405,12 @@ class LiveStrategyExecution extends EventEmitter { this.perfManager.on('update', () => this._emitStrategyExecutionResults('perf', { price: this.priceFeed.price.toNumber() })) } + async restartExecution (ws2Manager) { + this.ws2Manager = ws2Manager + this._registerManagerEventListeners() + await this.execute() + } + /** * @public */