-
-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
馃挕 Make it possible to edit one server's config #286
Comments
If you need the cache overall, and only one server got a problem, indeed you should do the solution no. 2, because 1 would rather affect you and all servers negatively (due to more processing and additional delays). |
While that is true, the CPU of the server usually sits on 2-5% usage, and the disks are pretty idle too. What I'm struggling with most is actually memory, so reducing cache might even be a good thing. I doubt it will affect it very much |
Another benefit with this would be that we could bulk-edit channels for people if they had a lot and couldn't do it on their own (for example after migrations) |
Describe the improvement
I want to be able to edit a server's config (manually on the VPS) and then have that changed be applied in the server without having to restart the bot.
Problems this improvement solves
When v3 rolled out yesterday we had one server (so far) that encountered an error when changing a specific setting. I still haven't figured out the root cause, but I am 99% sure it would be fixed if I manually edited their config and reset the setting. The problem is that if I do that, the change won't be taken into account until the bot is restarted, since Needle does heavy caching and only reads the config from file if it hasn't read it before.
Alternative solutions
There are a few possible solutions. We should take #128 into account in that we might have a remote database as a storage medium in the future.
Less aggressive caching
We could try to add some kind of timer for how long guild configs should be in cache, for example 15 minutes or so. Then we could edit the config manually, and know that it would be a maximum of 15 minutes before this change is applied to the server (given that they don't overwrite it during that time)
Add a bot owner command
We could also add a guild command (not a global command) to my personal development server (or whichever guild ID is chosen with the .env file) that lets the bot owner reset the cache for a given server. With functionality like this it would be easy to expand into other developer commands if I ever need something else done while the bot is running.
Some other solutions are
I'm leaning towards option 1 but happy to hear other suggestions :)
The text was updated successfully, but these errors were encountered: