Skip to content

Commit f8d033f

Browse files
committed
only set status = 1 after announcing play (prev_n1 inaccurate)
1 parent d4ed9c6 commit f8d033f

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

domains/osu.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -554,16 +554,6 @@ async def osuSubmitModularSelector(conn: Connection) -> Optional[bytes]:
554554
glob.datadog.increment('gulag.submitted_scores')
555555

556556
if s.status == SubmissionStatus.BEST:
557-
# Our score is our best score.
558-
# Update any preexisting personal best
559-
# records with SubmissionStatus.SUBMITTED.
560-
await glob.db.execute(
561-
f'UPDATE {table} SET status = 1 '
562-
'WHERE status = 2 AND map_md5 = %s '
563-
'AND userid = %s AND mode = %s',
564-
[s.bmap.md5, s.player.id, s.mode.as_vanilla]
565-
)
566-
567557
if glob.datadog:
568558
glob.datadog.increment('gulag.submitted_scores_best')
569559

@@ -601,6 +591,16 @@ async def osuSubmitModularSelector(conn: Connection) -> Optional[bytes]:
601591
s.player.enqueue(packets.notification(f'You achieved #1! ({performance})'))
602592
announce_chan.send(s.player, ' '.join(ann), to_self=True)
603593

594+
# Our score is our best score.
595+
# Update any preexisting personal best
596+
# records with SubmissionStatus.SUBMITTED.
597+
await glob.db.execute(
598+
f'UPDATE {table} SET status = 1 '
599+
'WHERE status = 2 AND map_md5 = %s '
600+
'AND userid = %s AND mode = %s',
601+
[s.bmap.md5, s.player.id, s.mode.as_vanilla]
602+
)
603+
604604
s.id = await glob.db.execute(
605605
f'INSERT INTO {table} VALUES (NULL, '
606606
'%s, %s, %s, %s, %s, %s, '

0 commit comments

Comments
 (0)