@rip-lang/db 1.3.79 → 1.3.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/db.rip +3 -4
- package/package.json +1 -1
package/db.rip
CHANGED
|
@@ -124,15 +124,14 @@ console.log "rip-db: source #{path}"
|
|
|
124
124
|
checkpoint = -> try conn.query 'CHECKPOINT'
|
|
125
125
|
checkpointTimer = setInterval checkpoint, 5 * 60 * 1000
|
|
126
126
|
|
|
127
|
-
# Graceful shutdown: checkpoint
|
|
127
|
+
# Graceful shutdown: checkpoint and exit (DuckDB FFI close segfaults in Bun)
|
|
128
128
|
shuttingDown = false
|
|
129
129
|
shutdown = ->
|
|
130
130
|
return if shuttingDown
|
|
131
|
+
p "\n\nrip-db: shutting down server"
|
|
131
132
|
shuttingDown = true
|
|
132
133
|
clearInterval checkpointTimer if checkpointTimer
|
|
133
|
-
checkpoint()
|
|
134
|
-
try conn.close!
|
|
135
|
-
try db.close!
|
|
134
|
+
try checkpoint()
|
|
136
135
|
exit!
|
|
137
136
|
|
|
138
137
|
process.on 'SIGINT', shutdown
|