Skip to content

Commit 02dcd8b

Browse files
committed
remove getStatus method
1 parent cd61f2a commit 02dcd8b

1 file changed

Lines changed: 0 additions & 10 deletions

File tree

src/boilingdata/boilingdata.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ export class BoilingData {
150150
if (cbs?.onSocketClose) cbs.onSocketClose();
151151
};
152152
sock.socket.onopen = () => {
153-
this.getStatus();
154153
if (cbs?.onSocketOpen) cbs.onSocketOpen();
155154
resolve();
156155
};
@@ -282,15 +281,6 @@ export class BoilingData {
282281
this.socketInstance.send(payload);
283282
}
284283

285-
private getStatus(): void {
286-
if (this.autoStatus !== undefined && this.autoStatus === false) return;
287-
// Once a minute fetch full status if fetched status is older than 5 mins
288-
const { lastActivity } = this.socketInstance;
289-
const fiveMinsMs = 5 * 60 * 1000;
290-
if (Date.now() - lastActivity < fiveMinsMs) this.execQuery({ sql: "SELECT * FROM status;" });
291-
this.statusTimer = setTimeout(() => this.getStatus(), 60000);
292-
}
293-
294284
private processBatchInfo(message: unknown): void {
295285
if (!isDataResponse(message)) return;
296286
// Keeps track of the recieved batches, executes event when all batches have been recieved.

0 commit comments

Comments
 (0)