You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Don't cache at all: I think this would be quite some overhead on the disk IO and I don't think this is a good idea. But I haven't tested it.
Add a command for administrators to reset the server's cache by themselves. This would only ever be useful if I am fixing something for them, so it would just add unnecessary clutter.
I'm leaning towards option 1 but happy to hear other suggestions :)
The text was updated successfully, but these errors were encountered:
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: