Update submitModularHandler.pyx
This commit is contained in:
parent
37730c1bb1
commit
1090d34d38
|
@ -141,7 +141,10 @@ class handler(requestsManager.asyncRequestHandler):
|
|||
# increment user playtime
|
||||
length = 0
|
||||
if s.passed:
|
||||
try:
|
||||
length = userUtils.getBeatmapTime(beatmapInfo.beatmapID)
|
||||
except Exception:
|
||||
log.error("Maxi's mirror must be down, as getBeatmapTime failed. L144 submitModular")
|
||||
else:
|
||||
length = math.ceil(int(self.get_argument("ft")) / 1000)
|
||||
|
||||
|
@ -230,7 +233,6 @@ class handler(requestsManager.asyncRequestHandler):
|
|||
oldPersonalBestRank = 0
|
||||
oldPersonalBest = None
|
||||
|
||||
|
||||
# Save score in db
|
||||
s.saveScoreInDB()
|
||||
|
||||
|
@ -348,7 +350,6 @@ class handler(requestsManager.asyncRequestHandler):
|
|||
oldUserData = glob.userStatsCache.get(userID, s.gameMode)
|
||||
oldRank = userUtils.getGameRank(userID, s.gameMode)
|
||||
|
||||
|
||||
# Always update users stats (total/ranked score, playcount, level, acc and pp)
|
||||
# even if not passed
|
||||
|
||||
|
@ -402,7 +403,6 @@ class handler(requestsManager.asyncRequestHandler):
|
|||
if beatmapInfo is not None and beatmapInfo != False and s.passed:
|
||||
log.debug("Started building ranking panel.")
|
||||
|
||||
|
||||
if isRelaxing: # Relax
|
||||
# Trigger bancho stats cache update
|
||||
glob.redis.publish("peppy:update_rxcached_stats", userID)
|
||||
|
@ -498,6 +498,7 @@ class handler(requestsManager.asyncRequestHandler):
|
|||
params = urlencode({"k": glob.conf.config["server"]["apikey"], "to": "#announce", "msg": annmsg})
|
||||
requests.get("{}/api/v1/fokabotMessage?{}".format(glob.conf.config["server"]["banchourl"], params))
|
||||
|
||||
# Add the #1 to the database. Yes this is spaghetti.
|
||||
scoreUtils.newFirst(s.scoreID, userID, s.fileMd5, s.gameMode, isRelaxing)
|
||||
|
||||
# Write message to client
|
||||
|
|
Reference in New Issue
Block a user