Fixing error in sending commands to closed process queue

This commit is contained in:
Rafael Vargas
2022-07-31 19:50:59 -04:00
parent 5b61947904
commit 4fd23c56b6
9 changed files with 49 additions and 7 deletions

View File

@@ -11,7 +11,7 @@ from Music.MessagesController import MessagesController
from Music.Song import Song
from Parallelism.PlayerProcess import PlayerProcess
from Music.Playlist import Playlist
from Parallelism.ProcessInfo import ProcessInfo
from Parallelism.ProcessInfo import ProcessInfo, ProcessStatus
from Parallelism.Commands import VCommands, VCommandsType
from Music.VulkanBot import VulkanBot
@@ -170,6 +170,8 @@ class ProcessManager(Singleton):
queue1.join_thread()
queue2.close()
queue2.join_thread()
# Set the status of this process as sleeping, only the playlist object remains
self.__playersProcess[guildID].setStatus(ProcessStatus.SLEEPING)
async def showNowPlaying(self, guildID: int, song: Song) -> None:
messagesController = self.__playersMessages[guildID]