Private
Public Access
1
0

implemented make_plot

This commit is contained in:
Sander Roosendaal
2017-09-26 12:57:00 +02:00
parent 4ec43770db
commit d56a8bb74d
3 changed files with 45 additions and 10 deletions

View File

@@ -72,15 +72,24 @@ class Command(BaseCommand):
]
res += wid
link = 'http://rowsandall.com/rowers/workout/'+str(wid[0])+'/edit'
if uploadoptions and not 'error' in uploadoptions:
w = Workout.objects.get(wid[0])
r = w.user
if 'make_plot' in uploadoptions:
plottype = uploadoptions['plottype']
res = uploads.make_plot(r,w,plottype,
title,f2[6:],f2)
try:
if wid != 1:
dd = send_confirm(rr.user,title,link)
dd = send_confirm(rr.user,title,link,
uploadoptions)
time.sleep(10)
except:
try:
time.sleep(10)
if wid != 1:
dd = send_confirm(rr.user,title,link)
dd = send_confirm(rr.user,title,link,
uploadoptions)
except:
pass
@@ -94,7 +103,14 @@ class Command(BaseCommand):
]
res += wid
link = 'http://rowsandall.com/rowers/workout/'+str(wid[0])+'/edit'
if uploadoptions:
w = Workout.objects.get(wid[0])
r = w.user
if 'make_plot' in uploadoptions:
plottype = uploadoptions['plottype']
res = uploads.make_plot(r,w,plottype,
title,f2[6:],f2)
except:
# replace with code to process error
res += ['fail: '+name]
@@ -102,7 +118,8 @@ class Command(BaseCommand):
wid = 1
try:
if wid != 1:
dd = send_confirm(rr.user,name,link)
dd = send_confirm(rr.user,name,link,
uploadoptions)
time.sleep(10)
except:
pass