more logging on strava
This commit is contained in:
@@ -2760,7 +2760,11 @@ def fetch_strava_workout(stravatoken,oauth_data,stravaid,csvfilename,userid,debu
|
||||
f.write('Response json {json}\n'.format(json=response.json()))
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
workoutsummary = requests.get(url,headers=headers).json()
|
||||
|
||||
|
||||
try:
|
||||
startdatetime = workoutsummary['start_date']
|
||||
except KeyError:
|
||||
@@ -2774,6 +2778,16 @@ def fetch_strava_workout(stravatoken,oauth_data,stravaid,csvfilename,userid,debu
|
||||
coords = get_strava_stream(None,'latlng',stravaid,authorizationstring=authorizationstring)
|
||||
power = get_strava_stream(None,'watts',stravaid,authorizationstring=authorizationstring)
|
||||
|
||||
t = time.localtime()
|
||||
timestamp = time.strftime('%b-%d-%Y_%H%M', t)
|
||||
with open('strava_webhooks.log','a') as f:
|
||||
f.write('\n')
|
||||
f.write(timestamp)
|
||||
f.write(' ')
|
||||
f.write(url)
|
||||
f.write(' ')
|
||||
f.write('Response data {data}\n'.format(data=workoutsummary))
|
||||
|
||||
if t is not None:
|
||||
nr_rows = len(t)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user