replacing keyword async with harmless alternative
This commit is contained in:
@@ -439,14 +439,14 @@ def createstravaworkoutdata(w,dozip=True):
|
||||
# Upload the TCX file to Strava and set the workout activity type
|
||||
# to rowing on Strava
|
||||
def handle_stravaexport(f2,workoutname,stravatoken,description='',
|
||||
activity_type='Rowing',async=False):
|
||||
activity_type='Rowing',quick=False):
|
||||
# w = Workout.objects.get(id=workoutid)
|
||||
client = stravalib.Client(access_token=stravatoken)
|
||||
|
||||
act = client.upload_activity(f2,'tcx.gz',name=workoutname)
|
||||
|
||||
try:
|
||||
if async:
|
||||
if quick:
|
||||
res = act.wait(poll_interval=1.0, timeout=10)
|
||||
message = 'Workout successfully synchronized to Strava'
|
||||
else:
|
||||
@@ -625,7 +625,7 @@ def add_workout_from_data(user,importid,data,strokedata,
|
||||
|
||||
return id,message
|
||||
|
||||
def workout_strava_upload(user,w, async=False):
|
||||
def workout_strava_upload(user,w, quick=False):
|
||||
try:
|
||||
thetoken = strava_open(user)
|
||||
except NoTokenError:
|
||||
@@ -648,7 +648,7 @@ def workout_strava_upload(user,w, async=False):
|
||||
f,w.name,
|
||||
r.stravatoken,
|
||||
description=w.notes+'\n from '+w.workoutsource+' via rowsandall.com',
|
||||
activity_type=r.stravaexportas,async=async)
|
||||
activity_type=r.stravaexportas,quick=quick)
|
||||
if res==0:
|
||||
message = mes
|
||||
w.uploadedtostrava = -1
|
||||
|
||||
Reference in New Issue
Block a user