mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-01-06 23:43:08 +00:00
fix: parse config json using int for thread count (#1345)
This commit is contained in:
parent
c80d44ff93
commit
2b9fc1eb55
@ -156,7 +156,7 @@ task libcodexDynamic, "Generate bindings":
|
||||
let name = "libcodex"
|
||||
buildLibrary name, "library/", params, "dynamic"
|
||||
|
||||
task libcodextatic, "Generate bindings":
|
||||
task libcodexStatic, "Generate bindings":
|
||||
var params = ""
|
||||
when compiles(commandLineParams):
|
||||
for param in commandLineParams():
|
||||
|
||||
@ -56,11 +56,7 @@ proc readValue*(r: var JsonReader, val: var SignedPeerRecord) =
|
||||
val = res.get()
|
||||
|
||||
proc readValue*(r: var JsonReader, val: var ThreadCount) =
|
||||
let res = ThreadCount.parse(r.readValue(string))
|
||||
if res.isErr:
|
||||
raise
|
||||
newException(SerializationError, "Cannot parse the thread count: " & res.error())
|
||||
val = res.get()
|
||||
val = ThreadCount(r.readValue(int))
|
||||
|
||||
proc readValue*(r: var JsonReader, val: var NBytes) =
|
||||
val = NBytes(r.readValue(int))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user