mirror of
https://github.com/PretendoNetwork/account.git
synced 2026-03-21 17:44:49 -05:00
chore: log warning when server health check fails
This commit is contained in:
parent
38c6e6ecdf
commit
b805019d28
|
|
@ -3,6 +3,7 @@ import crypto from 'node:crypto';
|
|||
import { Schema, model } from 'mongoose';
|
||||
import uniqueValidator from 'mongoose-unique-validator';
|
||||
import type { IServer, IServerConnectInfo, IServerMethods, ServerModel } from '@/types/mongoose/server';
|
||||
import { LOG_WARN } from '@/logger';
|
||||
|
||||
// * Kinda ugly to slap this in with the Mongoose stuff but it's fine for now
|
||||
// TODO - Maybe move this one day?
|
||||
|
|
@ -101,6 +102,7 @@ ServerSchema.method('getServerConnectInfo', async function (): Promise<IServerCo
|
|||
} catch {
|
||||
// * Eat error for now, this means that no address responded in time
|
||||
// TODO - Handle this
|
||||
LOG_WARN(`Server ${this.service_name} faield to find healthy NEX server. Falling back to random IP`);
|
||||
}
|
||||
|
||||
return {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user