moving cp calc to low prio queue
This commit is contained in:
@@ -1163,10 +1163,12 @@ def calculate_goldmedalstandard(rower,workout,recurrance=True):
|
|||||||
try:
|
try:
|
||||||
df = pd.read_parquet(cpfile)
|
df = pd.read_parquet(cpfile)
|
||||||
except:
|
except:
|
||||||
df, delta, cpvalues = setcp(workout)
|
df, delta, cpvalues = setcp(workout,background=True)
|
||||||
|
if df.empty:
|
||||||
|
return 0,0
|
||||||
|
|
||||||
if df.empty and recurrance:
|
if df.empty and recurrance:
|
||||||
df, delta, cpvalues = setcp(workout,recurrance=False)
|
df, delta, cpvalues = setcp(workout,recurrance=False,background=True)
|
||||||
if df.empty:
|
if df.empty:
|
||||||
return 0,0
|
return 0,0
|
||||||
|
|
||||||
@@ -1200,7 +1202,7 @@ def calculate_goldmedalstandard(rower,workout,recurrance=True):
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
jsondf = df2.to_json()
|
jsondf = df2.to_json()
|
||||||
job = myqueue(queue,handle_getagegrouprecords,
|
job = myqueue(queuelow,handle_getagegrouprecords,
|
||||||
jsondf,distances,durations,age,rower.sex,rower.weightcategory)
|
jsondf,distances,durations,age,rower.sex,rower.weightcategory)
|
||||||
|
|
||||||
wcpower = pd.Series(wcpower)
|
wcpower = pd.Series(wcpower)
|
||||||
|
|||||||
Reference in New Issue
Block a user