fitness of today not tomorrow
This commit is contained in:
@@ -1053,7 +1053,7 @@ def runcpupdate(
|
|||||||
theids = [w.id for w in theworkouts]
|
theids = [w.id for w in theworkouts]
|
||||||
|
|
||||||
job = myqueue(
|
job = myqueue(
|
||||||
queue,
|
queuelow,
|
||||||
handle_updatecp,
|
handle_updatecp,
|
||||||
rower.id,
|
rower.id,
|
||||||
theids,
|
theids,
|
||||||
@@ -1067,7 +1067,7 @@ def fetchcperg(rower,theworkouts):
|
|||||||
cpdf = getcpdata_sql(rower.id,table='ergcpdata')
|
cpdf = getcpdata_sql(rower.id,table='ergcpdata')
|
||||||
|
|
||||||
job = myqueue(
|
job = myqueue(
|
||||||
queue,
|
queuelow,
|
||||||
handle_updateergcp,
|
handle_updateergcp,
|
||||||
rower.id,
|
rower.id,
|
||||||
thefilenames)
|
thefilenames)
|
||||||
@@ -1388,7 +1388,7 @@ def fetchcp(rower,theworkouts,table='cpdata'):
|
|||||||
if not cpdf.empty:
|
if not cpdf.empty:
|
||||||
return cpdf['delta'],cpdf['cp'],avgpower2
|
return cpdf['delta'],cpdf['cp'],avgpower2
|
||||||
else:
|
else:
|
||||||
job = myqueue(queue,
|
job = myqueue(queuelow,
|
||||||
handle_updatecp,
|
handle_updatecp,
|
||||||
rower.id,
|
rower.id,
|
||||||
theids,
|
theids,
|
||||||
|
|||||||
@@ -1834,7 +1834,7 @@ def goldmedalscorechart(user,startdate=None,enddate=None):
|
|||||||
|
|
||||||
# all workouts
|
# all workouts
|
||||||
alldates,alltestpower,allduration,allids = all_goldmedalstandards(workouts,startdate,enddate)
|
alldates,alltestpower,allduration,allids = all_goldmedalstandards(workouts,startdate,enddate)
|
||||||
|
|
||||||
|
|
||||||
nrdays = (enddate-startdate).days
|
nrdays = (enddate-startdate).days
|
||||||
|
|
||||||
@@ -2041,8 +2041,8 @@ def performance_chart(user,startdate=None,enddate=None,kfitness=42,kfatigue=7,
|
|||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
endfitness = fitnesses[-1]
|
endfitness = fitnesses[-2]
|
||||||
endfatigue = fatigues[-1]
|
endfatigue = fatigues[-2]
|
||||||
endform = endfitness-endfatigue
|
endform = endfitness-endfatigue
|
||||||
|
|
||||||
if modelchoice == 'banister':
|
if modelchoice == 'banister':
|
||||||
|
|||||||
@@ -1676,27 +1676,17 @@ def performancemanager_view(request,userid=0,mode='rower',
|
|||||||
'dofatigue':dofatigue,
|
'dofatigue':dofatigue,
|
||||||
})
|
})
|
||||||
|
|
||||||
if not is_ajax:
|
|
||||||
script, thediv, endfitness, endfatigue, endform, ids = performance_chart(
|
|
||||||
theuser,startdate=startdate,enddate=enddate,
|
|
||||||
kfitness = kfitness,
|
|
||||||
kfatigue = kfatigue,
|
|
||||||
metricchoice = metricchoice,
|
|
||||||
doform = doform,
|
|
||||||
dofatigue = dofatigue,
|
|
||||||
showtests = True,
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
script, thediv, endfitness, endfatigue, endform, ids = performance_chart(
|
|
||||||
theuser,startdate=startdate,enddate=enddate,
|
|
||||||
kfitness = kfitness,
|
|
||||||
kfatigue = kfatigue,
|
|
||||||
metricchoice = metricchoice,
|
|
||||||
doform = doform,
|
|
||||||
dofatigue = dofatigue,
|
|
||||||
showtests = False,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
script, thediv, endfitness, endfatigue, endform, ids = performance_chart(
|
||||||
|
theuser,startdate=startdate,enddate=enddate,
|
||||||
|
kfitness = kfitness,
|
||||||
|
kfatigue = kfatigue,
|
||||||
|
metricchoice = metricchoice,
|
||||||
|
doform = doform,
|
||||||
|
dofatigue = dofatigue,
|
||||||
|
showtests = True,
|
||||||
|
)
|
||||||
|
|
||||||
ids = pd.Series(ids).dropna().values
|
ids = pd.Series(ids).dropna().values
|
||||||
|
|
||||||
bestworkouts = Workout.objects.filter(id__in=ids).order_by('date')
|
bestworkouts = Workout.objects.filter(id__in=ids).order_by('date')
|
||||||
|
|||||||
Reference in New Issue
Block a user