Private
Public Access
1
0

configuration of Physics calc to report progress

Needs rowingdata >= 1.3.2
This commit is contained in:
Sander Roosendaal
2017-11-03 09:23:51 +01:00
parent f1694793b0
commit b266881858
4 changed files with 46 additions and 12 deletions

View File

@@ -347,7 +347,7 @@ def handle_sendemailcsv(first_name, last_name, email, csvfile,debug=False):
@app.task(bind=True)
def handle_otwsetpower(f1, boattype, weightvalue,
def handle_otwsetpower(self,f1, boattype, weightvalue,
first_name, last_name, email, workoutid,
**kwargs):
# ps=[
@@ -359,6 +359,19 @@ def handle_otwsetpower(f1, boattype, weightvalue,
if 'jobkey' in kwargs:
job_id = kwargs.pop('jobkey')
if 'ps' in kwargs:
ps = kwargs['ps']
else:
ps = [1,1,1,1]
if 'ratio' in kwargs:
ratio = kwargs['ratio']
else:
ratio = 1.0
if 'debug' in kwargs:
debug = kwargs['debug']
else:
debug = False
kwargs['jobid'] = job_id
@@ -402,7 +415,7 @@ def handle_otwsetpower(f1, boattype, weightvalue,
secret = PROGRESS_CACHE_SECRET
progressurl += "/rowers/record-progress/"
progressurl += str(progress)+"/"+jobid
progressurl += job_id
rowdata.otw_setpower_silent(skiprows=5, mc=weightvalue, rg=rg,
powermeasured=powermeasured,