Private
Public Access
1
0

reviewed email notifications

This commit is contained in:
Sander Roosendaal
2017-09-19 09:25:49 +02:00
parent cd19fcd707
commit b3a6d0390f
2 changed files with 11 additions and 6 deletions

View File

@@ -88,7 +88,8 @@ def processattachments():
wid = [make_new_workout_from_email(rr,a.document,name)]
res += wid
link = 'https://rowsandall.com/rowers/workout/'+str(wid[0])+'/edit'
dd = send_confirm(u,name,link)
if wid != 1:
dd = send_confirm(u,name,link)
except:
# replace with code to process error
res += ['fail: '+name]
@@ -138,9 +139,9 @@ def processattachments_debug():
print name
wid = [make_new_workout_from_email(rr,a.document,name)]
res += wid
print wid
link = 'https://rowsandall.com/rowers/workout/'+str(wid[0])+'/edit'
dd = send_confirm(u,name,link)
if wid != 1:
dd = send_confirm(u,name,link)

View File

@@ -70,12 +70,14 @@ class Command(BaseCommand):
res += wid
link = 'http://rowsandall.com/rowers/workout/'+str(wid[0])+'/edit'
try:
dd = send_confirm(rr.user,title,link)
if wid != 1:
dd = send_confirm(rr.user,title,link)
time.sleep(10)
except:
try:
time.sleep(10)
dd = send_confirm(rr.user,title,link)
if wid != 1:
dd = send_confirm(rr.user,title,link)
except:
pass
@@ -94,8 +96,10 @@ class Command(BaseCommand):
# replace with code to process error
res += ['fail: '+name]
donotdelete = 1
wid = 1
try:
dd = send_confirm(rr.user,name,link)
if wid != 1:
dd = send_confirm(rr.user,name,link)
time.sleep(10)
except:
pass