1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-11-17 04:10:59 -05:00

Remove reconnected event

Seems entirely useless and both events just emits at once (reconnected and connected) when it loses connection to the database
This commit is contained in:
Toast 2023-08-29 02:37:16 +10:00 committed by GitHub
parent 1773e58d49
commit 6a3a7edb71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,7 +24,6 @@ export default async(client:TClient)=>{
.on('disconnecting', ()=>console.log(client.logTime(), `${LogPrefix} Disconnecting from MongoDB`)) .on('disconnecting', ()=>console.log(client.logTime(), `${LogPrefix} Disconnecting from MongoDB`))
.on('disconnected', ()=>console.log(client.logTime(), `${LogPrefix} Disconnected from MongoDB`)) .on('disconnected', ()=>console.log(client.logTime(), `${LogPrefix} Disconnected from MongoDB`))
.on('close', ()=>console.log(client.logTime(), `${LogPrefix} MongoDB has closed the connection`)) .on('close', ()=>console.log(client.logTime(), `${LogPrefix} MongoDB has closed the connection`))
.on('reconnected', ()=>console.log(client.logTime(), `${LogPrefix} Connection to MongoDB has been re-established`))
.on('all', ()=>console.log(client.logTime(), `${LogPrefix} Successfully established a connection to all members`)) .on('all', ()=>console.log(client.logTime(), `${LogPrefix} Successfully established a connection to all members`))
.on('fullsetup', ()=>console.log(client.logTime(), `${LogPrefix} Successfully established a connection to Primary server & atleast one member`)) .on('fullsetup', ()=>console.log(client.logTime(), `${LogPrefix} Successfully established a connection to Primary server & atleast one member`))
.on('error', ((err:mongoose.Error)=>console.error(client.logTime(), `${LogPrefix} Encountered an error in MongoDB: ${err.message}`))); .on('error', ((err:mongoose.Error)=>console.error(client.logTime(), `${LogPrefix} Encountered an error in MongoDB: ${err.message}`)));