start py39
This commit is contained in:
@@ -727,7 +727,8 @@ def handle_sporttracks_sync(workoutid, url, headers, data, debug=False, **kwargs
|
||||
|
||||
|
||||
@app.task
|
||||
def handle_strava_sync(stravatoken, workoutid, filename, name, activity_type, description, debug=False, **kwargs):
|
||||
def handle_strava_sync(stravatoken,
|
||||
workoutid, filename, name, activity_type, description, debug=False, **kwargs):
|
||||
client = stravalib.Client(access_token=stravatoken)
|
||||
failed = False
|
||||
try:
|
||||
@@ -735,7 +736,7 @@ def handle_strava_sync(stravatoken, workoutid, filename, name, activity_type, de
|
||||
try:
|
||||
act = client.upload_activity(f, 'tcx.gz', name=name)
|
||||
try:
|
||||
res = act.wait(poll_interval=1.0, timeout=10)
|
||||
res = act.wait(poll_interval=1.0, timeout=30)
|
||||
except stravalib.exc.ActivityUploadFailed: # pragma: no cover
|
||||
dologging('strava_fail.log', 'Strava upload failed for Workout {id} ActivityUploadFailed'.format(
|
||||
id=workoutid))
|
||||
|
||||
Reference in New Issue
Block a user