Private
Public Access
1
0

registration email from template

This commit is contained in:
Sander Roosendaal
2018-03-20 18:44:33 +01:00
parent 05f44f6547
commit 639473e2f8
3 changed files with 67 additions and 17 deletions

View File

@@ -303,7 +303,10 @@ def handle_stravaexport(f2,workoutname,stravatoken,description='',
# w = Workout.objects.get(id=workoutid)
client = stravalib.Client(access_token=stravatoken)
act = client.upload_activity(f2,'tcx.gz',name=workoutname)
try:
act = client.upload_activity(f2,'tcx.gz',name=workoutname)
except:
return {0,'Strava upload failed'}
try:
res = act.wait(poll_interval=5.0,timeout=30)
message = 'Workout successfully synchronized to Strava'