Skip to content

Commit

Permalink
#fix: fix prom instance recreation
Browse files Browse the repository at this point in the history
  • Loading branch information
akvlad committed Oct 16, 2023
1 parent ab59344 commit 4f876aa
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions wasm_parts/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,20 @@ class WasmError extends Error {}
module.exports.WasmError = WasmError

let counter = 0
var go
var go = new Go();
var wasm

async function init () {
const _go = new Go()
const _wasm = await WebAssembly.instantiate(
gunzipSync(fs.readFileSync(WASM_URL)), _go.importObject)
_go.run(_wasm.instance)
wasm = _wasm.instance
go = _go
const _wasm = await WebAssembly.instantiate(
gunzipSync(fs.readFileSync(WASM_URL)), go.importObject)
go.run(_wasm.instance)
wasm = _wasm.instance
}

init()
setInterval(async () => {
init()
}, 600000)
}, 300000)

/**
*
Expand Down

0 comments on commit 4f876aa

Please sign in to comment.