Study-Together-Org / time_counter

12 stars 5 forks source link

~p lower than !p at beginning of month #28

Closed gene4587 closed 3 years ago

gene4587 commented 3 years ago

~p is lower than !p for some people. Not sure if it's inaccurate but people who experience this issue claim to have more than what their ~p is saying.

See images for examples: image image

image image

Zackhardtoname commented 3 years ago

I think there's a bug on the transition of months but I can't figure out what it is... Will have to put in a lot of effort into this :(

Feb technically starts on 2/1 5 pm utc for the bot but it seems like it started early for some reason. Yet if it started early, the hours should be more not less. Maybe it has to do with in_session data...

gene4587 commented 3 years ago

Okay, thanks Zack! Will add more screenshots if it helps?

User didn't use the beta but I noticed the !me and !p has larger numbers than that of ~me and ~p image image image

gene4587 commented 3 years ago

Which part is the 2 hour difference?

All time has a 15.6h difference Monthly has a 5.4h difference

Anyways, take your time! Just noting this in case it's useful. :)

Zackhardtoname commented 3 years ago

Which part is the 2 hour difference?

All time has a 15.6h difference Monthly has a 5.4h difference

Anyways, take your time! Just noting this in case it's useful. :)

ah you are right. This is pretty helpful. The first few examples I checked were all 2 hours less and I misread the last one :)

gene4587 commented 3 years ago

Hi Zack! Seems like there are more people experiencing this issue.

Monthly stats for ıamkaan#7767 show 10h in v1. For v2, it's showing 0.2h image image

There's also antara #8748 with

image image image

Zackhardtoname commented 3 years ago

In the future, could you always provide the user id since users change their names often?

Zackhardtoname commented 3 years ago

@gene4587 what's the ID of 1amkaan? I can't find him

Zackhardtoname commented 3 years ago

@nadir7379 at what exact time did v1 reset for February?

gene4587 commented 3 years ago

@gene4587 what's the ID of 1amkaan? I can't find him

759809559010213898 here! Sorry will provide IDs in the future.

gene4587 commented 3 years ago

From: 493091239881605121 (AutumnAlpaca#4127) Reports that ~me is lagging behind with hours

Hello! So when using the two different commands, !me and -me, there are different sets of data that show up (e.g. the value for hours studied in the last week changes). Is one command more correct than the other or...? image

riipant commented 3 years ago

solutions(with a lot of assumptions) -- assuming both bot counts and updates different DB, I suggest either of the 2 options-

  1. restrict both these bots to only "me" and "lb" functions. That is updating DB and fetching data from DB. Make a new bot just for updating roles(let's call the bot "R "). Logic of "R" could be - a. fetch "hours" from both DB. b. if( "!hours"== "~hours") { update role; } ELSE update role as per higher count. Bot with lower count must be stuck-->raise flag
  2. keep mirroring the DBs. I mean compare all hour fields of one to the other. If different, the update the higher value in both and raise a flag.
Zackhardtoname commented 3 years ago

solutions(with a lot of assumptions) -- assuming both bot counts and updates different DB, I suggest either of the 2 options-

  1. restrict both these bots to only "me" and "lb" functions. That is updating DB and fetching data from DB. Make a new bot just for updating roles(let's call the bot "R "). Logic of "R" could be - a. fetch "hours" from both DB. b. if( "!hours"== "~hours") { update role; } ELSE update role as per higher count. Bot with lower count must be stuck-->raise flag
  2. keep mirroring the DBs. I mean compare all hour fields of one to the other. If different, the update the higher value in both and raise a flag.

Thank you for the suggestion! @riipant Definitely one way to do it if v1 and v2 co-exist for a long time. It's possible we will get rid of v1 soon. There are also some more tasks that need to be done before #13

I think the role question/suggestion is more fitted to be discussed under #13 btw.

gene4587 commented 3 years ago

@Zackhardtoname

From: the little sur#7717 (601953827041706016)

my all time hours are always higher in ~me than in !me

5h difference between both. image image

Zackhardtoname commented 3 years ago

@Zackhardtoname

From: the little sur#7717 (601953827041706016)

my all time hours are always higher in ~me than in !me

5h difference between both.

What's the problem? It doesn't seem like a v2 issue. Def not this particular issue so I guess I'll hide it.

Zackhardtoname commented 3 years ago

Seems to be resolved somehow