refined hard
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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],
|
||||
|
||||
Reference in New Issue
Block a user