Update quitProc for nim 1.6 deprecation warning. draft
authorMahlon E. Smith <mahlon@martini.nu>
Wed, 20 Oct 2021 11:41:30 -0700
changeset 24 af18a10710be
parent 22 4250addd706f
Update quitProc for nim 1.6 deprecation warning.
Makefile
netdata_tsrelay.nim
--- a/Makefile	Sat Dec 12 21:46:39 2020 -0800
+++ b/Makefile	Wed Oct 20 11:41:30 2021 -0700
@@ -14,7 +14,7 @@
 	nim --debugger:on --nimcache:.cache c ${FILES}
 
 release: ${FILES}
-	nim -d:release --opt:speed --parallelBuild:0 --nimcache:.cache c ${FILES}
+	nim -d:release -d:nimDebugDlOpen --opt:speed --parallelBuild:0 --nimcache:.cache c ${FILES}
 
 docs:
 	nim doc ${FILES}
--- a/netdata_tsrelay.nim	Sat Dec 12 21:46:39 2020 -0800
+++ b/netdata_tsrelay.nim	Wed Oct 20 11:41:30 2021 -0700
@@ -1,6 +1,6 @@
 # vim: set et nosta sw=4 ts=4 :
 #
-# Copyright (c) 2018-2020, Mahlon E. Smith <mahlon@martini.nu>
+# Copyright (c) 2018-2021, Mahlon E. Smith <mahlon@martini.nu>
 # All rights reserved.
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions are met:
@@ -31,11 +31,11 @@
 import
     db_postgres,
     json,
-    math,
     nativesockets,
     net,
     parseopt,
     posix,
+    std/exitprocs,
     strutils,
     strformat,
     tables,
@@ -382,7 +382,7 @@
 
 
 when isMainModule:
-    system.addQuitProc( resetAttributes )
+    addExitProc( resetAttributes )
     conf = parse_cmdline()
     if conf.debug: echo hl( $conf, fgYellow )
     serverloop( conf )