Private
Public Access
1
0

adding more logging

This commit is contained in:
2023-09-22 17:12:29 +02:00
parent 9fdfe56660
commit 62edae10ec
2 changed files with 14 additions and 2 deletions

View File

@@ -1735,11 +1735,21 @@ def workout_trimp(w, reset=False):
def workout_rscore(w, reset=False):
dologging('metrics.log','Workout_rscore for {w} {id}, {reset}'.format(
w = w,
id = w.id,
reset = reset
))
if w.rscore > -1 and not reset:
dologging('metrics.log','Returning {rscore}, {normp}'.format(
rscore = w.rscore,
normp = w.normp,
))
return w.rscore, w.normp
if get_existing_job(w):
return 0, 0
dologging('metrics.log','Got existing job, returning whatever we have')
return w.rscore, w.normp
r = w.user
ftp = float(r.ftp)
@@ -1751,6 +1761,8 @@ def workout_rscore(w, reset=False):
r.hrftp = int(hrftp)
r.save()
dologging('metrics.log','Queueing an asynchronous task')
_ = myqueue(
queuehigh,
handle_calctrimp,
@@ -1762,7 +1774,7 @@ def workout_rscore(w, reset=False):
r.max,
r.rest)
return 0, 0
return w.rscore, w.normp
def workout_normv(w, pp=4.0):

Binary file not shown.