Added changelog and removed total guilds in KV in favor of Discord API
parent
c33d1ea2ce
commit
2daed2f704
34
CHANGELOG.md
34
CHANGELOG.md
|
@ -1,3 +1,35 @@
|
||||||
# Changelog
|
# 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
|
## 2.0.0 | June 8th 2023
|
||||||
- Initial Release
|
- Initial Release
|
|
@ -85,9 +85,6 @@ async fn main() {
|
||||||
|
|
||||||
let shard_manager = client.shard_manager.clone();
|
let shard_manager = client.shard_manager.clone();
|
||||||
|
|
||||||
#[cfg(feature = "stats")]
|
|
||||||
let cache = client.cache_and_http.cache.clone();
|
|
||||||
|
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
let mut term: Option<Box<dyn Any + Send>> = Some(Box::new(
|
let mut term: Option<Box<dyn Any + Send>> = Some(Box::new(
|
||||||
tokio::signal::unix::signal(SignalKind::terminate())
|
tokio::signal::unix::signal(SignalKind::terminate())
|
||||||
|
@ -104,13 +101,8 @@ async fn main() {
|
||||||
_ = tokio::time::sleep(std::time::Duration::from_secs(60)) => {
|
_ = tokio::time::sleep(std::time::Duration::from_secs(60)) => {
|
||||||
#[cfg(feature = "stats")]
|
#[cfg(feature = "stats")]
|
||||||
{
|
{
|
||||||
let guild_count = cache.guilds().len();
|
|
||||||
let active_count = session_manager.get_active_session_count().await;
|
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) {
|
if let Err(why) = stats_manager.set_active_count(active_count) {
|
||||||
error!("Failed to update active count: {why}");
|
error!("Failed to update active count: {why}");
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,12 +12,6 @@ impl StatsManager {
|
||||||
Ok(StatsManager { redis })
|
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<()> {
|
pub fn set_active_count(&self, count: usize) -> Result<()> {
|
||||||
let mut con = self.redis.get_connection()?;
|
let mut con = self.redis.get_connection()?;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue