Start server without Redis.
Closed this issue · 4 comments
Description
Actually, when the server starts, if a Redis connection is not established, the server throws an error. This happens because the await BanListMemoryRepository.backup();
code in src/index.ts
loads all the banlist names to Redis for duel stats. We need the server to start with or without Redis.
Tasks
- Refactor the
backup
method inBanListMemoryRepository
to not take action if the Redis connection is not set. - Refactor the
handle
method inGameCreatorHandler
to create anunranked
room if Redis is not working. - Send a system message when an unranked room is created due to a Redis error: "Actually, ranked rooms are not working. Sorry for the problems. This will be fixed soon."
Acceptance Criteria
- The server can start if Redis is not working.
- If a ranked room is to be created and Redis is not working, create an unranked room.
- Send "Actually, ranked rooms are not working. Sorry for the problems. This will be fixed soon." if an unranked room was created due to a Redis error.
Hello, I'm a CS student eager to make my first contributions on GitHub, and I'm interested in helping out with this project! I've encountered this issue following the README instructions. Could you provide guidance on how to run the server despite this issue?
Hello, I'm a CS student eager to make my first contributions on GitHub, and I'm interested in helping out with this project! I've encountered this issue following the README instructions. Could you provide guidance on how to run the server despite this issue?
Hello @jjackdavis, thank you for your interest in our project!
If you have followed the README instructions, you only need to install Redis and run it on your machine. If you prefer not to install Redis, you can comment out line 21 await BanListMemoryRepository.backup();
in src/index.ts
. Another option is to use the recently added docker-compose.yml
file, which includes everything necessary to run the project with hot reload.
Soon, I'll publish the contribution guide with all the explanatory code. 🙌
Update
A fix for this issue has been implemented and is available for review in pull request #91. Please review the PR to verify the solution and provide any feedback.
Thank you!
Thanks @diegofcornejo . Merged