donotuse: disables stop calls for profiling purposes!

This commit is contained in:
benbierens 2023-07-02 11:37:38 +02:00
parent 0004c5bc67
commit 67b54592e4
No known key found for this signature in database
GPG Key ID: FE44815D96D0A1AA
2 changed files with 8 additions and 6 deletions

View File

@ -101,7 +101,7 @@ when isMainModule:
except Exception as exc: raiseAssert exc.msg # shouldn't happen
notice "Shutting down after having received SIGINT"
pendingFuts.add(server.stop())
# pendingFuts.add(server.stop())
state = CodexStatus.Stopping
notice "Stopping Codex"
@ -116,7 +116,7 @@ when isMainModule:
proc SIGTERMHandler(signal: cint) {.noconv.} =
notice "Shutting down after having received SIGTERM"
pendingFuts.add(server.stop())
# pendingFuts.add(server.stop())
state = CodexStatus.Stopping
notice "Stopping Codex"
@ -131,12 +131,12 @@ when isMainModule:
chronos.poll()
# wait fot futures to finish
let res = waitFor allFinished(pendingFuts)
# let res = waitFor allFinished(pendingFuts)
state = CodexStatus.Stopped
if res.anyIt( it.failed ):
error "Codex didn't shutdown correctly"
quit QuitFailure
# if res.anyIt( it.failed ):
# error "Codex didn't shutdown correctly"
# quit QuitFailure
notice "Exited codex"

View File

@ -22,6 +22,8 @@ import pkg/stew/io2
import pkg/stew/shims/net as stewnet
import pkg/datastore
import std/nimprof
import ./node
import ./conf
import ./rng