Private
Public Access
1
0

refined hard

This commit is contained in:
Sander Roosendaal
2017-10-10 14:48:07 +02:00
parent 977c8b9a79
commit 7cc59cb71a
2 changed files with 6 additions and 2 deletions

View File

@@ -38,7 +38,10 @@ import pandas as pd
import numpy as np
import itertools
import math
from tasks import handle_sendemail_unrecognized,handle_sendemail_breakthrough
from tasks import (
handle_sendemail_unrecognized,handle_sendemail_breakthrough,
handle_sendemail_hard
)
from django.conf import settings
from sqlalchemy import create_engine
@@ -672,7 +675,7 @@ def save_workout_database(f2,r,dosmooth=True,workouttype='rower',
if res:
isbreakthrough = True
res = datautils.updatecp(delta,cpvalues,r)
if res2:
if res2 and not isbreakthrough:
ishard = True
# submit email task to send email about breakthrough workout

View File

@@ -151,6 +151,7 @@ def isbreakthrough(delta,cpvalues,p0,p1,p2,p3,ratio):
res = np.sum(cpvalues>pwr)
res2 = np.sum(cpvalues>pwr2)
btdf = pd.DataFrame(
{
'delta':delta[cpvalues>pwr],