mirror of
https://github.com/syuilo/ai.git
synced 2024-11-22 13:17:59 +00:00
config serverMonitoringが効かないのを修正
This commit is contained in:
parent
6c7fe8877f
commit
e07415f4cb
|
@ -5,6 +5,7 @@ type Config = {
|
||||||
apiUrl: string;
|
apiUrl: string;
|
||||||
keywordEnabled: boolean;
|
keywordEnabled: boolean;
|
||||||
reversiEnabled: boolean;
|
reversiEnabled: boolean;
|
||||||
|
serverMonitoring: boolean;
|
||||||
mecab?: string;
|
mecab?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,8 @@ export default class ServerModule implements IModule {
|
||||||
private statsLogs: any[] = [];
|
private statsLogs: any[] = [];
|
||||||
|
|
||||||
public install = (ai: 藍) => {
|
public install = (ai: 藍) => {
|
||||||
|
if (!config.serverMonitoring) return;
|
||||||
|
|
||||||
this.ai = ai;
|
this.ai = ai;
|
||||||
|
|
||||||
this.connection = new ReconnectingWebSocket(`${config.wsUrl}/server-stats`, [], {
|
this.connection = new ReconnectingWebSocket(`${config.wsUrl}/server-stats`, [], {
|
||||||
|
|
Loading…
Reference in a new issue