Private
Public Access
1
0

working, not tested asynchronous OTE ranking

This commit is contained in:
Sander Roosendaal
2017-10-26 16:39:02 +02:00
parent 704d7a9128
commit 0e185f9c2f
8 changed files with 104 additions and 36 deletions

View File

@@ -400,7 +400,24 @@ def handle_otwsetpower(f1, boattype, weightvalue,
return 1
# This function generates all the static (PNG image) plots
@app.task
def handle_updateergcp(rower_id,workoutfilenames,debug=False):
therows = []
for f1 in workoutfilenames:
rowdata = rdata(f1)
if rowdata != 0:
therows.append(rowdata)
cpdata = rowingdata.cumcpdata(therows)
cpdata.columns = cpdata.columns.str.lower()
updatecpdata_sql(rower_id,cpdata['delta'],cpdata['cp'],
table='ergcpdata',distance=cpdata['distance'],
debug=debug)
return 1
@app.task
def handle_updatecp(rower_id,workoutids,debug=False):