Private
Public Access
1
0
This commit is contained in:
Sander Roosendaal
2021-10-27 20:15:04 +02:00
parent f7fc033f21
commit e6e104ac96
2 changed files with 3 additions and 3 deletions

View File

@@ -79,7 +79,7 @@ def get_token(code):
def strava_open(user): def strava_open(user):
t = time.localtime() t = time.localtime()
timestamp = time.strftime('%b-%d-%Y_%H%M', t) timestamp = time.strftime('%b-%d-%Y_%H%M', t)
with open('strava_webhooks.log','a') as f: with open('strava_open.log','a') as f:
f.write('\n') f.write('\n')
f.write(timestamp) f.write(timestamp)
f.write(' ') f.write(' ')
@@ -446,7 +446,7 @@ def handle_stravaexport(f2,workoutname,stravatoken,description='',
try: try:
if quick: # pragma: no cover if quick: # pragma: no cover
res = act.wait(poll_interval=1.0, timeout=10) res = act.wait(poll_interval=2.0, timeout=10)
message = 'Workout successfully synchronized to Strava' message = 'Workout successfully synchronized to Strava'
else: else:
res = act.wait(poll_interval=5.0,timeout=30) res = act.wait(poll_interval=5.0,timeout=30)

View File

@@ -328,7 +328,7 @@ def handle_strava_sync(stravatoken,workoutid,filename,name,activity_type,descrip
try: try:
act = client.upload_activity(f,'tcx.gz',name=name) act = client.upload_activity(f,'tcx.gz',name=name)
try: try:
res = act.wait(poll_interval=1.0, timeout=60) res = act.wait(poll_interval=1.0, timeout=10)
except stravalib.exc.ActivityUploadFailed: # pragma: no cover except stravalib.exc.ActivityUploadFailed: # pragma: no cover
failed = True failed = True
except JSONDecodeError: # pragma: no cover except JSONDecodeError: # pragma: no cover