mirror of
https://github.com/codex-storage/nim-codex.git
synced 2025-01-22 10:49:09 +00:00
Adds debugfutures endpoint
This commit is contained in:
parent
a89938478a
commit
0004c5bc67
@ -297,6 +297,15 @@ proc initRestApi*(node: CodexNodeRef, conf: CodexConf): RestRouter =
|
||||
|
||||
return RestApiResponse.response($json, contentType="application/json")
|
||||
|
||||
router.api(
|
||||
MethodGet,
|
||||
"/api/codex/v1/debug/futures") do () -> RestApiResponse:
|
||||
let count = pendingFuturesCount()
|
||||
let json = %*{
|
||||
"futures": $count
|
||||
}
|
||||
return RestApiResponse.response($json, contentType="application/json")
|
||||
|
||||
when codex_enable_api_debug_peers:
|
||||
router.api(
|
||||
MethodGet,
|
||||
|
@ -3,7 +3,7 @@ ARG BUILDER=ubuntu:lunar-20230415
|
||||
ARG IMAGE=${BUILDER}
|
||||
ARG BUILD_HOME=/src
|
||||
ARG MAKE_PARALLEL=${MAKE_PARALLEL:-4}
|
||||
ARG NIMFLAGS="${NIMFLAGS:-"-d:disableMarchNative"}"
|
||||
ARG NIMFLAGS="${NIMFLAGS:-"-d:disableMarchNative -d:chronosFutureTracking -d:codex_enable_api_debug_peers=true"}"
|
||||
ARG APP_HOME=/codex
|
||||
ARG NAT_IP_AUTO=${NAT_IP_AUTO:-false}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user