shorter strava interval
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user