AQ update

This commit is contained in:
peter
2020-08-13 12:03:35 +02:00
parent bd5b33e4a1
commit 7c1b0b73ed
35 changed files with 1343 additions and 881 deletions
+9 -5
View File
@@ -79,7 +79,7 @@ export class FrontworkAdmin
])
.catch(e => getLogger('Admin#stop').warn(e))
.finally(() => {
this.rpcServer.destroy()
this.rpcServer.close()
process.exit(0)
})
}
@@ -107,18 +107,22 @@ export class FrontworkAdmin
}
private startWebsocket() {
this.rpcServer = new RPCServer(20000, [
this.rpcServer = new RPCServer([
...this.frontworkComponents,
{
name: "debug",
exportRPCs: () => [{
RPCs: () => [{
name: 'dumpDb',
call: async (table) => await this.knex(table).select('*')
}]
}
], {
visibility: '0.0.0.0'
})
errorHandler: (sock, err, rpc, args) => {
console.log(rpc, err);
}
}).listen(20000)
getLogger('Admin#startWebsocket').debug("Websocket up on", 20000)
}