BafDyce / botamusique

Bot to play local music on Mumble (using pymumble). youtube;soundcloud,radio soon.
MIT License
1 stars 0 forks source link

Don't reload file list every time a command is issued #24

Open DaChrissi opened 6 years ago

DaChrissi commented 6 years ago

cache it unless refresh is neccessary

BafDyce commented 6 years ago

I think a safe assumption would be to cache the list for something like 1-2 minutes.

fsteffek commented 6 years ago

How about reloading when a song...

or/and when a command like !reload or !list or !refresh is issued ?

BafDyce commented 6 years ago

I wouldn't create a new command for that - I would just do it silently in the background. We should definitely update the list when songs are added or deleted. However, care should be taken when we add this at too many places, as there might be race conditions then.

We definitely need a safe guard preventing race conditions for that.