Skip to content

Commit

Permalink
Merge pull request #5049 from ignazio-bovo/colossus/uptime-feat
Browse files Browse the repository at this point in the history
Colossus/uptime feat
  • Loading branch information
kdembler authored Feb 26, 2024
2 parents fc7a297 + c3ab489 commit e716e1d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions storage-node/client/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@ export interface StatusResponse {
* @memberof StatusResponse
*/
'version': string;
/**
*
* @type {number}
* @memberof StatusResponse
*/
'uptime': number;
/**
*
* @type {string}
Expand Down
3 changes: 3 additions & 0 deletions storage-node/src/api-spec/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ components:
type: object
required:
- version
- uptime
- queryNodeStatus
- uploadBuckets
- downloadBuckets
Expand All @@ -280,6 +281,8 @@ components:
properties:
version:
type: string
uptime:
type: number
nodeEnv:
type: string
queryNodeStatus:
Expand Down
1 change: 1 addition & 0 deletions storage-node/src/services/webApi/controllers/stateApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ export async function getStatus(req: express.Request, res: express.Response<Stat
// Copy from an object, because the actual object could contain more data.
res.status(200).json({
version: proc.version,
uptime: Math.floor(process.uptime()),
uploadBuckets,
downloadBuckets,
sync,
Expand Down

0 comments on commit e716e1d

Please sign in to comment.