parabol
parabol copied to clipboard
feat: user presence supports k8s
Description
fix #7204
User presence is currently reset during a postDeploy step. This won't work when we move to k8s and have multiple servers deploying at different times.
This PR will wipe out user presence for all users connected to a given socket server during shutdown. In the event of an ungraceful shutdown, when a server starts up it performs a health check on all other servers. It then removes any user presence for servers that were not present during the health check.
Testing scenarios
- [ ] tbd
SonarCloud Quality Gate failed. 
1 Bug
0 Vulnerabilities
0 Security Hotspots
0 Code Smells
No Coverage information
0.0% Duplication
@Dschoordsch you're too kind! thanks for the review. I'm stuck on testing that SIGINT handler. i could call kill -s SIGINT, but i'd like to just ctrl+c, but that's not triggering it! I'm not sure what is swallowing the signal...
i misunderstood the SIGINT handler, it doesn't handle promises. instead of doing async work in the SIGINT handler, I'll have the dying node publish a message to all living nodes asking them to kill it in redis :grimacing:
@Dschoordsch would you mind giving this old thing a fresh review?
I think this is good to go, we're got a lot of risky PRs going on right now, so I'll hold off on merging this until things calm down in a week or so.