Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory issue? Pomo not notifying end of sessions #17

Open
agent4tea7 opened this issue Jan 29, 2021 · 7 comments · Fixed by #21
Open

Memory issue? Pomo not notifying end of sessions #17

agent4tea7 opened this issue Jan 29, 2021 · 7 comments · Fixed by #21
Labels
bug Something isn't working

Comments

@agent4tea7
Copy link

Lately, Calcifer starts a session but forgets to end it and notify user that it has ended.

The frequency of this happening is random.

@sjBao
Copy link

sjBao commented Feb 4, 2021

not sure if this is related but here is an unexpected behavior that I also encountered:

c: pom pom >>> created timer for 50 minutes
c: cancel >>> received a cancellation message
c: pom >>> received a message for new 25 minute pom

-- 25 minutes after first pom, never received a pom completion message --

c: pom >>> received message that I'm already working

-- 50 minutes after first pom, received pom completion message for first pom.

@andreidimaano andreidimaano added the bug Something isn't working label Feb 5, 2021
@andreidimaano
Copy link
Owner

This may have a possible fix - moving everything the isStudying functionality to the database.

Tradeoffs:

  1. O(logn) search time for all users in a server vs O(n) search time for all users currently studying
  2. A user may still be studying when the bot turns off, this means that a user may be marked as isStudying when the bot restarts when in fact, the bot just restarted and never removed from isStudying
  3. More data - every user now has an isStudying datatype but this should be O(1) added space. However, we are adding O(n) space when considering the new collection of isStudying members and isOnBreak Members.

Tradeoff 2 may be fixed by creating a collection in the database called "users currently studying" and when the bot restarts (due to Heroku) I will check if any users are still currently studying, and clear them (and maybe award them points).

@andreidimaano andreidimaano linked a pull request Feb 20, 2021 that will close this issue
@han-codes
Copy link

han-codes commented Feb 21, 2021

Just leaving a comment that I noticed this issue a couple times today of not being notified when pom ends :)
Edit: Pom persists until it's cancelled with c: cancel

@agent4tea7
Copy link
Author

Second this issue, it's not ending sessions for some users. It's increasingly difficult to work with, as you have to manually end the sessions, kind of defeats the purpose of a timer-bot. Does kicking the bot off and inviting back on fix this issue? Has anyone tried?

@andreidimaano
Copy link
Owner

andreidimaano commented Mar 18, 2021

Second this issue, it's not ending sessions for some users. It's increasingly difficult to work with, as you have to manually end the sessions, kind of defeats the purpose of a timer-bot. Does kicking the bot off and inviting back on fix this issue? Has anyone tried?

It says the bot is missing permissions

The other issue is that guild is sometimes null so people are starting pomodoros through DM Channels

@andreidimaano
Copy link
Owner

Does kicking the bot off and inviting back on fix this issue? Has anyone tried?

Kicking the bot and then adding it back won't work.

@agent4tea7
Copy link
Author

Second this issue, it's not ending sessions for some users. It's increasingly difficult to work with, as you have to manually end the sessions, kind of defeats the purpose of a timer-bot. Does kicking the bot off and inviting back on fix this issue? Has anyone tried?

It says the bot is missing permissions

The other issue is that guild is sometimes null so people are starting pomodoros through DM Channels

If the bot is missing permissions, how is it able to start and end timers for some users and not for others? - I don't think these users are starting timers from DM channels. There's dedicated channel for this bot.

Does the bot need admin rights? Wouldn't think so..but Idk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants