TransGG / uncute-rina

Python transplace bot with fancy funky features
MIT License
0 stars 1 forks source link

/watchlist sometimes seems to wait unnecessarily long to post #21

Closed MysticMia closed 1 month ago

MysticMia commented 2 months ago

When adding a user to the watch list, it fetches a list of open watchlist threads and saves it. If a list has already been fetched, it can simply get it from memory. If, while fetching, another /watchlist command is issued, it will wait until the previous is done fetching, and returns the same fetched list.

Intended behavior: After fetching, the 'busy' variable is set to 0 and the first command proceeds. While busy, the second command waits 1 second between each busy check and will continue between 0 and 1 seconds after the first command is done fetching.

Actual behavior: The first command has been seen giving a response about 30 seconds after the second command (even though this seems impossible..?)

MysticMia commented 1 month ago

Might be fixed with commit 864b7dfaf53f9eae2f55e9b5d8b78e038463bab4, since it seems to fetch the watchlist correctly now first try after restarts? Perhaps file splitting made the local variable be updated correctly when starting up :)