Skip to content

Commit

Permalink
server: changed uptime getter
Browse files Browse the repository at this point in the history
  • Loading branch information
olton committed Jul 12, 2021
1 parent 917b92a commit fdda656
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
### 1.1.2
+ [x] Fixed memory leaks for setTimeout circular links

+ [x] Server: added `process.memory` to get mem request

### 1.1.1
+ [x] Server: improved alerts for `FORK` states
Expand Down
2 changes: 1 addition & 1 deletion server/monitor.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import http from "http"
import https from "https"
import {sysInfo} from "./system.mjs"
import {processCollectNodeInfo} from "./node.mjs"
import {getBlocks, getExplorerSummary, processExplorer, processWinningBlocks} from "./explorer.mjs"
import {getBlocks, processExplorer, processWinningBlocks} from "./explorer.mjs"
import {processAlerter} from "./alerter.mjs"
import {processBalanceSend} from "./balance-sender.mjs"
import {processHello} from "./hello.mjs"
Expand Down
3 changes: 2 additions & 1 deletion server/system.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ const getMem = () => {
return {
total,
free,
used: total - free
used: total - free,
process: process.memoryUsage()
}
}

Expand Down
2 changes: 1 addition & 1 deletion server/uptime.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import fetch from "node-fetch"

export const getUptime = async (key) => {
if (!key) return null
const link = `https://minastake.com/utils/uptime.php?publicKey=${key}`
const link = `https://minastake.com/uptime/uptime.php?publicKey=${key}`
const data = await fetch(link)
return data.ok ? data.json() : null
}
Expand Down

0 comments on commit fdda656

Please sign in to comment.