Added changelog and removed total guilds in KV in favor of Discord API

main
DaXcess 2023-09-25 12:01:44 +02:00
parent c33d1ea2ce
commit 2daed2f704
No known key found for this signature in database
GPG Key ID: CF78CC72F0FD5EAD
3 changed files with 33 additions and 15 deletions

View File

@ -1,3 +1,35 @@
# Changelog
## 2.1.1 | September 23rd 2023
Reduced the amount of CPU that the bot uses from ~15%-25% per user to 1%-2% per user (percentage per core, benched on an AMD Ryzen 9 5950X).
### Changes
* Fixed issue #20
**Full Changelog**: https://github.com/SpoticordMusic/spoticord/compare/v.2.1.0...v2.1.1
## 2.1.0 | September 20th 2023
So, it's been a while since I worked on this project, and some bugs have since been discovered.
The main focus for this version is to stop using multiple processes for every player, and instead do everything in threads.
### Changes
- Remove metrics, as I wasn't using this feature anyways
- Bring back KV for storing total/active sessions, as prometheus is no longer being used
- Allocate new players in-memory, instead of using subprocesses
- Fix issue #17
- Fix some issues with the auto-disconnect
- Removed the automatic device switching on bot join, which was causing some people to not be able to use the bot
- Force communication through the closest Spotify AP, reducing latency
- Potential jitter reduction
- Enable autoplay
- After skipping a song, you will no longer hear a tiny bit of the previous song after the silence
**Full Changelog**: https://github.com/SpoticordMusic/spoticord/compare/v2.0.0...v.2.1.0
### Issues
- Currently, the CPU usage is much higher than it used to be. I really wanted to push this update out before taking the time to do some optimizations, as the bot and server are still easily able to hold up the limited amount of Spoticord users (and v2.0.0 was just falling apart). Issue is being tracked in #20
## 2.0.0 | June 8th 2023
- Initial Release
- Initial Release

View File

@ -85,9 +85,6 @@ async fn main() {
let shard_manager = client.shard_manager.clone();
#[cfg(feature = "stats")]
let cache = client.cache_and_http.cache.clone();
#[cfg(unix)]
let mut term: Option<Box<dyn Any + Send>> = Some(Box::new(
tokio::signal::unix::signal(SignalKind::terminate())
@ -104,13 +101,8 @@ async fn main() {
_ = tokio::time::sleep(std::time::Duration::from_secs(60)) => {
#[cfg(feature = "stats")]
{
let guild_count = cache.guilds().len();
let active_count = session_manager.get_active_session_count().await;
if let Err(why) = stats_manager.set_server_count(guild_count) {
error!("Failed to update server count: {why}");
}
if let Err(why) = stats_manager.set_active_count(active_count) {
error!("Failed to update active count: {why}");
}

View File

@ -12,12 +12,6 @@ impl StatsManager {
Ok(StatsManager { redis })
}
pub fn set_server_count(&self, count: usize) -> Result<()> {
let mut con = self.redis.get_connection()?;
con.set("sc-bot-total-servers", count.to_string())
}
pub fn set_active_count(&self, count: usize) -> Result<()> {
let mut con = self.redis.get_connection()?;