fix: gently log the port on which the realtime service listens (#21575)

* fix: gently log the port on which the realtime service listens

without this, the service remains completely silent (e.g. in overmind) and it is hard to tell if it is even running

* Revert "fix: gently log the port on which the realtime service listens"

This reverts commit 14a21989c6767520d8e1b9d46cc9f58a45768563.

* refactor(socketio): explicitly listen on port

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
This commit is contained in:
David Arnold 2023-07-14 01:06:31 -05:00 committed by GitHub
parent 0a0f6ac2ca
commit 98d38e7333
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,7 +3,7 @@ const { Server } = require("socket.io");
const { get_conf, get_redis_subscriber } = require("../node_utils");
const conf = get_conf();
let io = new Server(conf.socketio_port, {
let io = new Server({
cors: {
// Should be fine since we are ensuring whether hostname and origin are same before adding setting listeners for s socket
origin: true,
@ -52,3 +52,7 @@ subscriber.on("message", function (_channel, message) {
subscriber.subscribe("events");
// =======================
let port = conf.socketio_port;
io.listen(port);
console.log("Realtime service listening on: ", port);