fix: prevent large logs from service events (1)

This commit is contained in:
KernelDeimos 2024-07-24 02:31:45 -04:00
parent 5d5f5660b4
commit fa9cc8efcf
2 changed files with 10 additions and 2 deletions

View File

@ -119,8 +119,11 @@ class BroadcastService extends BaseService {
}
}
async ['__on_install.websockets'] (_, { server }) {
async ['__on_install.websockets'] () {
const svc_event = this.services.get('event');
const svc_webServer = this.services.get('web-server');
const server = svc_webServer.get_server();
const io = require('socket.io')(server, {
cors: { origin: '*' },

View File

@ -189,7 +189,12 @@ class WebServerService extends BaseService {
});
});
await this.services.emit('install.websockets', { server });
this.server_ = server;
await this.services.emit('install.websockets');
}
get_server () {
return this.server_;
}
async _init () {