pix
pix copied to clipboard
[TECH] Attendre patiemment la cloture des clients redis
:unicorn: Problème
Lorsque les process node se termine on clot les connexions Redis, mais sans faire d'await, hors, client.quit() est asynchrone https://github.com/redis/node-redis#disconnecting
:robot: Solution
Await sur les deconnexions
:rainbow: Remarques
:100: Pour tester
Vérifier que l'arrêt de l'API affiche bien les messages (non test automatiquement)
npm start
(Ctrl-C)
[14:12:50] INFO: Stopping HAPI server...
[14:12:50] INFO: server stopped
created: 1663769542878
started: 0
host: "OCTO-TOPI"
port: 3000
protocol: "http"
id: "OCTO-TOPI:35392:l8bpfffi"
uri: "http://OCTO-TOPI:3000"
address: "0.0.0.0"
[14:12:50] INFO: Closing connexions to database...
[14:12:50] INFO: Closing connexions to cache...
[14:12:50] INFO: Closing connexions to temporary storage...
[14:12:50] INFO: Closing connexions to redis monitor...
[14:12:50] INFO: Closing connexions to redis rate limiter...
[14:12:50] INFO: Exiting process...
[14:12:50] INFO: Disconnected from server
redisClient: "redis-monitor"
[14:12:50] INFO: Disconnected from server
redisClient: "temporary-storage"
[14:12:50] INFO: Disconnected from server
redisClient: "redis-cache-query-client"
[14:12:50] INFO: Disconnected from server
redisClient: "distributed-cache-subscriber"
[14:12:50] INFO: Disconnected from server
redisClient: "distributed-cache-publisher"
I'm deploying this PR to these urls:
- App (.fr): https://app-pr4958.review.pix.fr
- App (.org): https://app-pr4958.review.pix.org
- Orga: https://orga-pr4958.review.pix.fr
- Certif: https://certif-pr4958.review.pix.fr
- Admin: https://admin-pr4958.review.pix.fr
- API: https://api-pr4958.review.pix.fr/api/
Please check it out!