fine tuning the sending of email notifications
This commit is contained in:
@@ -82,6 +82,7 @@ from rowingdata import (
|
||||
from rowers.dataroutines import *
|
||||
|
||||
from rowers.tasks import (
|
||||
handle_sendemail_newftp,
|
||||
handle_sendemail_unrecognized, handle_setcp,
|
||||
handle_getagegrouprecords, handle_update_wps,
|
||||
handle_request_post, handle_calctrimp,
|
||||
@@ -735,8 +736,8 @@ def update_rolling_cp(r, types, mode='water'):
|
||||
r.p3 = p1[3]
|
||||
r.cpratio = res2[3]
|
||||
r.save()
|
||||
if pwr > r.ftp*(100.-r.otwslack)/100. and r.getemailnotifications and not r.emailbounced:
|
||||
_ = myqueue(queuehigh, handle_sendemail_newftp(r,pwr,'water'))
|
||||
if pwr-5 > r.ftp*(100.-r.otwslack)/100. and r.getemailnotifications and not r.emailbounced:
|
||||
_ = myqueue(queuehigh, handle_sendemail_newftp,r,pwr,'water')
|
||||
|
||||
else:
|
||||
r.ep0 = p1[0]
|
||||
@@ -745,8 +746,8 @@ def update_rolling_cp(r, types, mode='water'):
|
||||
r.ep3 = p1[3]
|
||||
r.ecpratio = res2[3]
|
||||
r.save()
|
||||
if pwr > r.ftp and r.getemailnotifications and not r.emailbounced:
|
||||
_ = myqueue(queuehigh, handle_sendemail_newftp(r,pwr,'water'))
|
||||
if pwr-5 > r.ftp and r.getemailnotifications and not r.emailbounced:
|
||||
_ = myqueue(queuehigh, handle_sendemail_newftp,r,pwr,'water')
|
||||
|
||||
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user