through email now
This commit is contained in:
@@ -165,7 +165,7 @@ def get_strava_workouts(rower):
|
||||
newids = [stravaid for stravaid in stravaids if not stravaid in knownstravaids]
|
||||
|
||||
for stravaid in newids:
|
||||
workoutid = create_async_workout(alldata,rower.user,stravaid)
|
||||
result = create_async_workout(alldata,rower.user,stravaid)
|
||||
|
||||
return 1
|
||||
|
||||
@@ -234,29 +234,38 @@ def create_async_workout(alldata,user,stravaid,debug=False):
|
||||
code = uuid4().hex[:16]
|
||||
)
|
||||
|
||||
w = Workout(
|
||||
user=r,
|
||||
workouttype = workouttype,
|
||||
name = title,
|
||||
date = workoutdate,
|
||||
starttime = starttime,
|
||||
startdatetime = rowdatetime,
|
||||
timezone = thetimezone,
|
||||
duration = duration,
|
||||
distance=distance,
|
||||
weightcategory = weightcategory,
|
||||
uploadedtostrava = stravaid,
|
||||
csvfilename = csvfilename,
|
||||
notes = ''
|
||||
)
|
||||
# w = Workout(
|
||||
# user=r,
|
||||
# workouttype = workouttype,
|
||||
# name = title,
|
||||
# date = workoutdate,
|
||||
# starttime = starttime,
|
||||
# startdatetime = rowdatetime,
|
||||
# timezone = thetimezone,
|
||||
# duration = duration,
|
||||
# distance=distance,
|
||||
# weightcategory = weightcategory,
|
||||
# uploadedtostrava = stravaid,
|
||||
# csvfilename = csvfilename,
|
||||
# notes = ''
|
||||
# )
|
||||
|
||||
w.save()
|
||||
|
||||
# Check if workout has stroke data, and get the stroke data
|
||||
|
||||
result = add_stroke_data(user,stravaid,w.id,rowdatetime,csvfilename,debug=debug)
|
||||
starttimeunix = arrow.get(rowdatetime).timestamp
|
||||
|
||||
return w.id
|
||||
job = myqueue(queue,
|
||||
handle_strava_import_stroke_data,
|
||||
title,
|
||||
user.email,
|
||||
r.stravatoken,
|
||||
stravaid,
|
||||
starttimeunix,
|
||||
csvfilename,
|
||||
)
|
||||
|
||||
return 1
|
||||
|
||||
from utils import get_strava_stream
|
||||
|
||||
|
||||
Reference in New Issue
Block a user