Private
Public Access
1
0

shorter strava interval

This commit is contained in:
Sander Roosendaal
2021-06-30 19:14:28 +02:00
parent 89b141c616
commit 9ce10f4f66

View File

@@ -327,7 +327,7 @@ def handle_strava_sync(stravatoken,workoutid,filename,name,activity_type,descrip
try:
act = client.upload_activity(f,'tcx.gz',name=name)
try:
res = act.wait(poll_interval=5.0, timeout=60)
res = act.wait(poll_interval=1.0, timeout=60)
except stravalib.exc.ActivityUploadFailed: # pragma: no cover
failed = True
except JSONDecodeError: # pragma: no cover
@@ -338,6 +338,7 @@ def handle_strava_sync(stravatoken,workoutid,filename,name,activity_type,descrip
failed = True
if not failed:
result = update_workout_field_sql(workoutid,'uploadedtostrava',res.id,debug=debug)
try:
act = client.update_activity(res.id,activity_type=activity_type,
description=description,device_name='Rowsandall.com')
@@ -353,7 +354,6 @@ def handle_strava_sync(stravatoken,workoutid,filename,name,activity_type,descrip
f.write(timestamp)
f.write(str(e))
result = update_workout_field_sql(workoutid,'uploadedtostrava',res.id,debug=debug)
try:
os.remove(filename)
except: # pragma: no cover