Private
Public Access
1
0

more logging on strava

This commit is contained in:
Sander Roosendaal
2020-09-24 22:16:04 +02:00
parent 5a774ba5be
commit 1d12985cd3
2 changed files with 21 additions and 0 deletions

View File

@@ -1064,6 +1064,13 @@ def strava_webhook_view(request):
ws = Workout.objects.filter(uploadedtostrava=stravaid)
if ws.count()==0 and r.strava_auto_import:
job = stravastuff.async_get_workout(r.user,stravaid)
if job == 0:
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('Strava strava_open yielded NoTokenError')
else:
timestamp = time.strftime('%b-%d-%Y_%H%M', t)
with open('strava_webhooks.log','a') as f: