fix(server-sdk): reconnect implemented
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import process from 'node:process'
|
||||
import { Format, LogLevel, setGlobalFormat, setGlobalLogLevel } from '@guiiai/logg'
|
||||
import { Client } from '@proj-airi/server-sdk'
|
||||
import { runUntilSignal } from '@proj-airi/server-sdk/utils/node'
|
||||
@@ -6,9 +7,17 @@ setGlobalFormat(Format.Pretty)
|
||||
setGlobalLogLevel(LogLevel.Log)
|
||||
|
||||
async function main() {
|
||||
const _client = new Client<{ connectionString: string }>({ name: 'memory-pgvector' })
|
||||
const client = new Client<{ connectionString: string }>({
|
||||
name: 'memory-pgvector',
|
||||
})
|
||||
|
||||
client.onEvent('module:configure', (_event) => {
|
||||
})
|
||||
|
||||
runUntilSignal()
|
||||
|
||||
process.on('SIGINT', () => client.close())
|
||||
process.on('SIGTERM', () => client.close())
|
||||
}
|
||||
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user