adding more logging
This commit is contained in:
@@ -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):
|
||||
|
||||
BIN
rowers/tests/testdata/testdata.tcx.gz
vendored
BIN
rowers/tests/testdata/testdata.tcx.gz
vendored
Binary file not shown.
Reference in New Issue
Block a user