Private
Public Access
1
0

video bug fix

This commit is contained in:
Sander Roosendaal
2020-04-19 16:16:56 +02:00
parent c95aa78009
commit 043b2eeba8
3 changed files with 32 additions and 2 deletions

View File

@@ -179,6 +179,8 @@ def handle_strava_sync(stravatoken,workoutid,filename,name,activity_type,descrip
res = act.wait(poll_interval=5.0, timeout=60)
except ActivityUploadFailed:
failed = True
except JSONDecodeError:
failed = True
if not failed:
try:
act = client.update_activity(res.id,activity_type=activity_type,
@@ -730,6 +732,24 @@ def handle_calctrimp(id,
normw = response.normw
hrtss = response.hrtss
if np.isnan(tss):
tss = 0
if np.isnan(normp):
normp = 0
if np.isnan(trimp):
trimp = 0
if np.isnan(normv):
normv = 0
if np.isnan(normw):
normw = 0
if np.isnan(hrtss):
hrtss = 0
query = 'UPDATE rowers_workout SET rscore = {tss}, normp = {normp}, trimp={trimp}, hrtss={hrtss}, normv={normv}, normw={normw} WHERE id={id}'.format(
tss = int(tss),