parent
61b5da846a
commit
ac2d3504bd
7
app.js
7
app.js
|
@ -167,9 +167,14 @@ wsServer.on('connection', socket => {
|
||||||
})
|
})
|
||||||
|
|
||||||
socket.on('message', async message => {
|
socket.on('message', async message => {
|
||||||
socket.send('Loading...')
|
|
||||||
message = JSON.parse(message)
|
message = JSON.parse(message)
|
||||||
|
|
||||||
|
if (message.mode === 'kill') {
|
||||||
|
console.log('KILLING SOCKET')
|
||||||
|
await killConsumer(consumers.get(socket))
|
||||||
|
consumers.delete(socket)
|
||||||
|
return
|
||||||
|
}
|
||||||
const currentMode = message.mode === 'realTime' ? realTimeSearch : search
|
const currentMode = message.mode === 'realTime' ? realTimeSearch : search
|
||||||
console.log('CLUSTERS before run', clusters)
|
console.log('CLUSTERS before run', clusters)
|
||||||
console.log('message.cluster', message.cluster)
|
console.log('message.cluster', message.cluster)
|
||||||
|
|
Loading…
Reference in New Issue