Skip to content

Commit

Permalink
fix: remove logs
Browse files Browse the repository at this point in the history
  • Loading branch information
bompo committed Dec 5, 2024
1 parent ae8403c commit 68826be
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lib/ProgramStateConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,23 +53,23 @@ export class ProgramStateConnection {

this.programStateSocket = nova.openReconnectingWebsocket(`/programs/state`)

this.log("Program state connection established")
this.programStateSocket.addEventListener("message", (ev) => {
this.log(ev.data)
const msg = tryParseJson(ev.data)

if (!msg) {
console.error("Failed to parse program state message", ev.data)
return
}
this.handleProgramStateMessage(msg)
if (msg.type === "update") {
this.handleProgramStateMessage(msg)
}
})
}

/** Handle a program state update from the backend */
async handleProgramStateMessage(msg: ProgramStateMessage) {
const { runner } = msg
this.log(runner.id)

// Ignoring other programs for now
// TODO - show if execution state is busy from another source
if (runner.id !== this.currentlyExecutingProgramRunnerId) return
Expand Down

0 comments on commit 68826be

Please sign in to comment.